Fetching contributors…
Cannot retrieve contributors at this time
47 lines (37 sloc) 1.3 KB
Simplified guide to deploying snapshots and releasing artifacts:
# https://issues.sonatype.org/browse/OSSRH-2234
# https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
$ cat > ~/.m2/settings.xml
# need gpg? https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
$ gpg --gen-key
# Deploys new snapshot:
$ mvn clean deploy
# Changes removes -SNAPSHOT in version from all modules,
# builds jars, sources and javadocs,
# signs them with gpg,
# sends them to Sonatype,
# sets tag in git to release,
# increases version on all project files, commit and pushed to github:
$ mvn release:clean
$ mvn release:prepare
Login at http://oss.sonatype.com with jira credentials.
Go to Staging Repositories page.
Select the staging repository you just uploaded.
Click the Close button.
Get a cup of tea...
Consider clicking Release button to sync to Maven central. After doing this it's impossible to modify nor remove the artifact.