I have a project A which needs AAA:BBB as a dependency.
<dependency>
<groupId>AAA</groupId>
<artifactId>BBB</artifactId>
<version>RELEASE</version>
</dependency>
After deploying a branch version(say, 0.2.1-4) of AAA:BBB, release version number is the latest deployed version number (0.2.1-4), not the HIGHEST number(0.3.3).
maven-metadata.xml:
<metadata>
<groupId>AAA</groupId>
<artifactId>BBB</artifactId>
<versioning>
<latest>0.3.3</latest>
<release>**0.2.1-4**</release>
<versions>
<version>0.1.0</version>
<version>0.1.0-1</version>
<version>0.1.0-2</version>
<version>0.2.1</version>
<version>0.2.1-3</version>
<version>0.3.1</version>
<version>0.3.3</version>
<version>**0.2.1-4**</version>
</versions>
<lastUpdated>20130628092226</lastUpdated>
</versioning>
</metadata>
Therefore when building project A, the RELEASE version number of AAA:BBB will be resolved to 0.2.1-4, not 0.3.3, which causes the build failed.
Only after ***rebuiling metadata via Sonatype nuxus UI*** can we have the HIGHEST version number.
maven-metadata.xml with sorted version number after rebuilding metadata:
<metadata>
<groupId>AAA</groupId>
<artifactId>BBB</artifactId>
<versioning>
<latest>0.3.3</latest>
<release>**0.3.3**</release>
<versions>
<version>0.1.0</version>
<version>0.1.0-1</version>
<version>0.1.0-2</version>
<version>0.2.1</version>
<version>0.2.1-3</version>
<version>0.2.1-4</version>
<version>0.3.1</version>
<version>**0.3.3**</version>
</versions>
<lastUpdated>20130628092226</lastUpdated>
</versioning>
</metadata>
Is it possible to update maven-metadata.xml's RELEASE VERSION
to HIGHEST VERSION
number after deploying an artifact?
Thanks.
6..The above example is from Nexus. – user2181574 Jul 02 '13 at 02:15