Reputation: 264
My maven-metadata.xml does not have the correct RELEASE version in Nexus. I am using Nexus 1.8.0.1. We use the maven-release-plugin to deploy to Nexus and the log indicates that it updates the metadata. We also see that the correct version gets added to the set of version. It is just the <release>
version that is incorrect.
<?xml version="1.0" encoding="UTF-8" ?>
- <metadata>
<groupId>com.xxxx.yyyy</groupId>
<artifactId>my-jar</artifactId>
<version>1.0.6</version>
- <versioning>
<release>1.0.9.2</release>
- <versions>
<version>1.0.6</version>
<version>1.0.7</version>
<version>1.0.8</version>
<version>1.0.9</version>
<version>1.0.9.1</version>
<version>1.0.9.2</version>
<version>1.0.5.1</version>
<version>1.0.10</version>
<version>1.0.11</version>
</versions>
<lastUpdated>20110314051727</lastUpdated>
</versioning>
</metadata>
I have tried recreating the file using the Nexus UI, but with no joy.
Cheers,
Geoff
Upvotes: 1
Views: 937
Reputation: 84088
If you want to specify a version as a release, then you should add -DperformRelease=true
to the build. This enables the release-profile
from the Maven Super POM, which in turn configures the maven-deploy-plugin. This configuration will tell the repository to update the release metadata to mark the artifact as the release.
So if you were now deploying 1.0.12, then the following command would set that as the released version:
mvn deploy -DperformRelease=true
Upvotes: 1