Maven sometimes fails to resolve newest dependency from remote snapshot
repository
----------------------------------------------------------------------------------
Key: MNG-3569
URL: http://jira.codehaus.org/browse/MNG-3569
Project: Maven 2
Issue Type: Bug
Components: Artifacts and Repositories
Affects Versions: 2.0.9, 2.0.8
Environment: Linux (Debian etch) & Windows Vista Ultimate
Reporter: Greg Martin
I have a project called common-core that is currently on version 1.1-SNAPSHOT.
I have another project that depends on
the 1.1-SNAPSHOT version of common-core.
The scenario that always reproduces this for me is:
deploy common-core from machine A
I end up with this maven-metadata-snapshot.xml in my local repository for
common-core:1.1-SNAPSHOT:
<metadata>
<groupId>my.group</groupId>
<artifactId>common-core</artifactId>
<version>1.1-SNAPSHOT</version>
<versioning>
<snapshot>
<buildNumber>5</buildNumber>
<timestamp>20080509.064349</timestamp>
</snapshot>
<lastUpdated>20080509064349</lastUpdated>
</versioning>
</metadata>
And in the remote snapshot repository, the maven-metadata.xml matches the above.
So, time passes, and I deploy common-core from machine B, and end up
with this maven-metadata-snapshot.xml in that local repository:
<metadata>
<groupId>my.group</groupId>
<artifactId>common-core</artifactId>
<version>1.1-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20080509.071037</timestamp>
<buildNumber>6</buildNumber>
</snapshot>
<lastUpdated>20080509071037</lastUpdated>
</versioning>
</metadata>
And now, in the remote snapshot repository, the maven-metadata.xml matches
the above.
If I now go back to machine A and do a mvn clean compile -X on the project
which depends on common-core, it resolves to the wrong snapshot version:
[DEBUG] common-core: resolved to version 1.1-20080509.064349-5 from repository
snapshot
[DEBUG] my.group:common-core:jar:1.1-SNAPSHOT:compile (selected for compile)
It doesn't look like it's even checking the remote snapshot repository for
updates.
I've tried this on both 2.0.8 and 2.0.9. Is is supposed to be working this way?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira