Gracia, Adrien wrote:
The problem we are having, is that even if there is a new version of a
SNAPSHOT, the newer version is not downloaded.
[...]
The way we understood the format of this file is as follow
<metadata>
<groupId>the group id</groupId>
<artifactId>the artifact id</artifactId>
<versioning>
<versions>
<version></version>
<version></version>
<version></version>
...
</versions>
<lastUpdated>the formatted timestamp of the most up to date
version</lastUpdated>
</versioning>
</metadata>
This file actually exists at different levels of the repository, having
a different format/contents at each level.
maven-metadata.xml at the groupId level serves plugin prefix mappings,
metadata at the groupId:artifactId level serves version range resolution
and metadata at the groupId:artifactId:version level supports SNAPSHOT
resolution.
The format you pasted actually describes groupId:artifactId level
metadata. To investigate issues with SNAPSHOT resolution, you need to
look at the metadata of this format:
<metadata>
<groupId>org.apache.maven</groupId>
<artifactId>maven-aether-provider</artifactId>
<version>3.0-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20101004.110147</timestamp>
<buildNumber>62</buildNumber>
</snapshot>
<lastUpdated>20101004110401</lastUpdated>
</versioning>
</metadata>
During resolution of X-SNAPSHOT, Maven will read the maven-metadata.xml
for all configured remote repos, select the one having the
biggest/newest <lastUpdated> field, and finally resolve the artifact
X-<timestamp>-<buildNumber>.
Now one question would be: Does the order of the version matter?
No.
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]