- Configure PGP
- Update your maven settings.xml with valid values (See settings.xml for the quick help).
mvn release:clean release:prepare
.- After successful run you will be able to find tag in the vcs for new version of your artifact.
mvn release:perform
.- After successful run you will be able to find your artifact in the Sonatype staging repository.
- Because of
<autoReleaseAfterClose>false</autoReleaseAfterClose>
fornexus-staging-maven-plugin
you will see 2 buttonsRelease
andDrop
, pay attention that Maven Central Release can't be undone, that is why double check all that you push to the Sonatype staging repository and only then press theRelease
.Drop
button simply delete your artifact from Sonatype staging repository. If you feel confidence you can just set<autoReleaseAfterClose>true</autoReleaseAfterClose>
fornexus-staging-maven-plugin
, in this situation release to the Maven Central will be performed automatically without extra steps with buttons (Release
,Drop
). As an alternative way of performing Maven Central Release you can usenexus-staging-maven-plugin
goals:nexus-staging:release
as equivalent forRelease
button on the UI of the Sonatype staging repository andnexus-staging:drop
as equivalent forDrop
button.