[ 
http://jira.codehaus.org/browse/MNG-5008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann closed MNG-5008.
----------------------------------

    Resolution: Incomplete
      Assignee: Benjamin Bentmann

SNAPSHOTs are already resolved based on the metadata timestamp and this report 
does not include enough information to isolate a faulty code path. Feel free to 
reopen with an example project that actually shows the defect you describe.

> resolution of concurrent SNAPSHOT artifacts from multiple repositories should 
> use timestamp instead of buildNumber 
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-5008
>                 URL: http://jira.codehaus.org/browse/MNG-5008
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 2.2.1, 3.0.1
>            Reporter: Julien CARSIQUE
>            Assignee: Benjamin Bentmann
>
> When getting a SNAPSHOT artifact from multiple repositories, Maven must 
> choose the more recent one. Using buildNumber is useless and meaningless as 
> the two repositories have separate incrementation of their buildNumber.
> For example, retrieving the two following metadata:
> <metadata>
>     <groupId>org.nuxeo.runtime</groupId>
>     <artifactId>nuxeo-runtime-parent</artifactId>
>     <version>5.4.1-SNAPSHOT</version>
>     <versioning>
>         <snapshot>
>             <timestamp>20110202.045408</timestamp>
>             <buildNumber>48</buildNumber>
>         </snapshot>
>         <lastUpdated>20110202045420</lastUpdated>
>     </versioning>
> </metadata>
> <metadata>
>     <groupId>org.nuxeo.runtime</groupId>
>     <artifactId>nuxeo-runtime-parent</artifactId>
>     <version>5.4.1-SNAPSHOT</version>
>     <versioning>
>         <snapshot>
>             <timestamp>20110206.141840</timestamp>
>             <buildNumber>18</buildNumber>
>         </snapshot>
>         <lastUpdated>20110206141840</lastUpdated>
>     </versioning>
> </metadata>
> As you can see, the snapshot artifact with timestamp 20110206.141840 is more 
> recent than the one with timestamp 20110202.045408.
> But when parsing the POM, comparing metadata, the oldest artifact will be 
> downloaded.
> I saw that issue raised on Jenkins which uses Maven API. Last year, I've 
> encountered the same issue with Nexus (also using Maven API) for which a 
> workaround was easily done as Nexus aggregates information from multiple 
> repositories. Such workaround may not be possible in Jenkins, or when 
> directly building with Maven. That need to be fixed in the Maven API.
> I guess it comes from 
> http://svn.apache.org/viewvc/maven/maven-3/tags/maven-3.0.2/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java?view=markup

-- 
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

        

Reply via email to