- Configure .m2/settings.xml file
- Point to the new settings
cd ~/repo/maven
mvn install --settings ~/.m2/settings.xml
- Generate new keys gpg --gen-key
- Get the Key Id gpg2 --list-keys
- Publish your key gpg2 --keyserver hkp://pool.sks-keyservers.net --send-keys YOURKEYID
- Change the version in build.xml
- Change the version in maven/pom.xml
- ant deploy (if it was a snapshot)
- ant stage (after remove -SNAPSHOT from the version name if it was a release)
- Access https://oss.sonatype.org/#stagingRepositories
- Close your staging repository, to automatic check if everything is ok.
- After your repository is checked as ok, click on Release button.
- Check Maven Central
Sonatype - Apache Ant Sonatype - Releasing the Deployment Sonatype - Working with PGP Signatures