Reputation: 1755
I have an issue with maven that keeps looking for springsource repos and consumes a lot of time trying to get through while the repos are unavailable :
[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/release' is invalid - Repository 'com.springsource.repository.bundles.release' will be blacklisted.
[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/external' is invalid - Repository 'com.springsource.repository.bundles.external' will be blacklisted.
My problem is that I don't understand why those repos are fetched as :
I've tried to blacklist the repos on our archiva and even in my local ~/.m2/settings.xml and even if the repos site show them as blacklisted, the error keeps up popping and consuming time.
I have the impression that this repo is fetched by the dependencies plugin as this occurs on site phase after the following log message :
[INFO] Generating "Dependencies" report --- maven-project-info-reports-plugin:2.6
And I also have a number of following errors preceding the repo errors :
...
[ERROR] Artifact: xerces:xml-apis:jar:2.11.0 has no file.
[ERROR] Artifact: xerces:xmlParserAPIs:jar:2.6.2 has no file.
[ERROR] Artifact: xml-apis:xml-apis:jar:1.3.02 has no file.
[ERROR] Artifact: xom:xom:jar:1.0 has no file.
...
Any idea on how to find the responsible (artifact or plugin) or to get rid of those errors are warmly welcomed.
Thanks for any clues
PS : I'm using maven 3.0.4 with JDK 1.7.0_04.
Upvotes: 0
Views: 1079
Reputation: 48105
Try to run:
mvn help:effective-pom
You'll see at least the following:
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
</repositories>
Then you'll probably also see the springsource repo.
You can also use the maven-enforcer-plugin
with it's Require No Repositories rule.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>enforce-no-repositories</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireNoRepositories>
<message>Best Practice is to never define repositories in pom.xml (use a repository manager instead)</message>
</requireNoRepositories>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
It will spit out the message for any dependency it finds that has a <repository/>
tag defined.
Upvotes: 1