This sounds familiar. I recall that maven 3 does some sort of metadata thing with respect to the repository cache, which is different compared to maven 2.
Either way I would recommend setting up a repository manager like nexus on your machine or local network, and use a repository group to aggregate proxy repos to all the sites you need. Then your metadata should all be from the same url and repo Id and as an added bonus your builds should be a lot faster. Sent from my Blackberry. ----- Original Message ----- From: Jane Young <[email protected]> To: [email protected] <[email protected]> Cc: GRECOURT,ROMAIN <[email protected]>; Sanjeeb Sahoo <[email protected]> Sent: Tue Apr 03 23:46:44 2012 Subject: Bug in Maven 3? Hi Maven Gurus, Looks like Maven 3 always try to download the transitive dependencies even though it's available in the local repo. In the pom, I have the following dependency defined: <dependency> <groupId>org.glassfish.fighterfish</groupId> <artifactId>osgi-web-container</artifactId> <version>1.0.2</version> </dependency> This artifact is available in Maven central. However, the transitive dependency "org.eclipse.persistence:javax.persistence" is not available in Maven central. So I added the EclipseLink repo in settings.xml: <profile> <id>eclipse-repo</id> <repositories> <repository> <id>eclipselink.repository</id> <name>EclipseLink Repo</name> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> <url>http://download.eclipse.org/rt/eclipselink/maven.repo/</url> <layout>default</layout> </repository> </repositories> </profile> The build succeeded when I compiled with "-Peclipse-repo" profile since it was able to download the javax.persistence artifact from EclipseLink Maven repo. The local maven repo is now populated with javax.persistence artifact. The second time I compiled w/o "-Peclipse-repo" profile, it failed with the following message: [ERROR] Failed to execute goal on project test.maven3: Could not resolve dependencies for project test:test.maven3:jar:1.0-SNAPSHOT: Failure to find org.eclipse.persistence:javax.persistence:jar:2.0.3 in http://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven-central has elapsed or updates are forced -> [Help 1] Why is Maven trying to download the artifact if it's available in the local maven repo? This works in Maven 2 but not Maven 3. Is this a bug in Maven 3? Thanks, Jane --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
