- Follow Central recommendations for setting up Apache Maven
- Ensure GPG is set up for signing jars
- Ensure
~/.m2/settings.xml
has the following contents for signing and uploading jars to Maven Central
<settings>
<servers>
<server>
<id>sonatype-nexus-staging</id>
<username>[OSS_USER]</username>
<password>[OSS_PASSWORD]</password>
</server>
</servers>
</settings>
[ ] Run unit testing and check test coverage
[ ] Ensure Javadoc API is fully documented
[ ] Update README.md for release
- Increment the version in
pom.xml
to a stable release: e.g.0.7
. Commit. - Tag the current commit: e.g.
0.7
. - Upload the release.
mvn -e clean deploy -P sonatype-oss-release
- Increment plugin version to next snapshot: e.g.
0.8-SNAPSHOT
. Commit. - Push commits and tags
git push origin && git push --tags origin
This will initially upload the artifact to a staging repository. Once confident about the release visit Maven Central Nexus and follow instructions on releasing to production.