You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2018/03/16 22:40:27 UTC
[jira] [Closed] (MNG-5324) Incorrect parsing of metadata by Maven:
Cannot find snapshot artifact with older timestamp
[ https://issues.apache.org/jira/browse/MNG-5324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MNG-5324.
-------------------------------
Resolution: Auto Closed
This issue has been auto closed because it has been inactive for a long period of time. If you think this issue still applies, retest your problem with the most recent version of Maven and the affected component, reopen and post your results.
> Incorrect parsing of metadata by Maven: Cannot find snapshot artifact with older timestamp
> ------------------------------------------------------------------------------------------
>
> Key: MNG-5324
> URL: https://issues.apache.org/jira/browse/MNG-5324
> Project: Maven
> Issue Type: Bug
> Components: Artifacts and Repositories
> Affects Versions: 3.0.4
> Reporter: Anton Smeenk
> Assignee: Robert Scholte
> Priority: Major
> Attachments: DefaultVersionResolver.java, DefaultVersionResolver.java, DefaultVersionResolver.patch
>
>
> Maven can only retrieve an artifact from Nexus with a classifier with latest timestamp.
> Artifacts with classifiers with an older timestamp cannot be resolved.
> For example. If I deploy an artifact Apple with classifier A and a bit later deploy the same artifact with classifier B.
> Next I want to retrieve the artifacts from Nexus:
> For a module Banana, which needs Apple with classifier A the Artifact resolver will fail.
> For a module Strawberry, which needs Apple with classifier B the Artifact resolver will succesfully resolve the artifact.
> I found the cause for this behaviour:
> With an proxy between Maven and Nexus I could see the behavour of Maven, at the moment that I want to fetch an artifact:
> First the metadata.xml is fetched from Nexus. This file does contain the timestamp of the latest artifact in nexus and all timestamps of older artifacts, with different classifier.
> From this metdata file Maven figures out what the correct name is for the artifact.
> But Maven can resolve the name of classifierb, but not the name of classifierB.
> The metadata is not correctly parsed! All information is there, but still Maven can only find the artifact with the latest timestamp.
> Here is an example of an metadata file:
> {code:xml}
> <metadata modelVersion="1.1.0">
> <groupId>com.ccv.systems.modules.gen_modem</groupId>
> <artifactId>modem</artifactId>
> <version>07.20.3-SNAPSHOT</version>
> <versioning>
> <snapshot>
> <timestamp>20120809.112920</timestamp>
> <buildNumber>97</buildNumber>
> </snapshot>
> <lastUpdated>20120809112920</lastUpdated>
> <snapshotVersion>
> <classifier>classsifierA</classifier>
> <extension>jar</extension>
> <value>07.20.3-20120809.112124-88</value>
> <updated>20120809112124</updated>
> </snapshotVersion>
> <snapshotVersion>
> <classifier>classsifierB</classifier>
> <extension>jar</extension>
> <value>07.20.3-20120809.112920-97</value>
> <updated>20120809112920</updated>
> </snapshotVersion>
> </snapshotVersions>
> </versioning>
> </metadata>
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)