How to stage release artifacts without modifying your POM using nexus-staging-maven-plugin

You may require nexus-staging-maven-plugin deployment of your release artifacts, but may not be in a position to modify your existing POM files. This article describes what is needed to achieve this.

First, make sure your projects use a release version, and not a SNAPSHOT version. Then deploy your project artifacts to a local deployment directory. For example:

mvn deploy -DaltDeploymentRepository=foo::default::file:///my/deployed/files

Then explicitly use the nexus-staging-maven-plugin to deploy your files as a single operation. The minimum required parameters are include below:

./mvn org.sonatype.plugins:nexus-staging-maven-plugin:1.4.7:deploy-staged-repository -DnexusUrl=http://localhost:8081/nexus -DserverId=dist-release -DrepositoryDirectory=/my/deployed/files -DstagingProfileId=132117103e8040aa

 

Use org.sonatype.plugins:nexus-staging-maven-plugin:1.4.7:help to get more information as to what parameters can be passed to the staging plugin.

Have more questions? Submit a request

0 Comments

Article is closed for comments.