You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2011/02/23 17:22:22 UTC
[jira] Updated: (MNG-4987) [regression] LATEST, RELEASE or SNAPSHOT
version picked from wrong repository when resolution order does not match
timestamp order
[ http://jira.codehaus.org/browse/MNG-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated MNG-4987:
-----------------------------------
Summary: [regression] LATEST, RELEASE or SNAPSHOT version picked from wrong repository when resolution order does not match timestamp order (was: LATEST or RELEASE version picked from wrong repository metadata.xml)
> [regression] LATEST, RELEASE or SNAPSHOT version picked from wrong repository when resolution order does not match timestamp order
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: MNG-4987
> URL: http://jira.codehaus.org/browse/MNG-4987
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Artifacts and Repositories
> Affects Versions: 3.0.2
> Environment: Ubuntu 10.10
> Reporter: Michael Hartmeier
>
> In maven-aether-provider 3.0.2, DefaultVersionResolver, line 378ff says
> {noformat}
> private void merge( String key, Map<String, VersionInfo> infos, String timestamp, String version,
> ArtifactRepository repository )
> {
> VersionInfo info = infos.get( key );
> if ( info == null )
> {
> info = new VersionInfo( timestamp, version, repository );
> infos.put( key, info );
> }
> else if ( info.isOutdated( timestamp ) )
> {
> info.version = version;
> info.repository = repository;
> }
> }
> {noformat}
> If I understand correctly, you should add
>
> {noformat}
> info.timestamp = timestamp
> {noformat}
> to the else part. Otherwise, you'll use a wrong timestamp in future calls to this method.
--
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