How to perform an Apache release.
Settings
First, configure your ~/.m2/settings.xml file to include your credentials.
<settings> ... <servers> <!-- To publish a snapshot of some part of Maven --> <server> <id>apache.snapshots.https</id> <username> <!-- YOUR APACHE LDAP USERNAME --> </username> <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password> </server> <!-- To stage a release of some part of Maven --> <server> <id>apache.releases.https</id> <username> <!-- YOUR APACHE LDAP USERNAME --> </username> <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password> </server> ... </servers> </settings>
To encrypt your password, use Maven's password encryption capabilities.
Step-by-step guide
To run on the clean master branch. Create a branch for the release candidate. Set it to track a release branch on the apache remote.
git co -b releases/X.Y.Z-incubating-RC0
git push -u apache
Test your settings:
mvn clean install -Papache-release -Pall -DcreateChecksum=true -DskipTests -Dmaven.javadoc.skip=true -Dgpg.passphrase=********
This will create the release artifacts, sign them, and put them in ~/.m2/repository/org/apache/samoa. Check that everything is alright before proceeding to the next step.
Perform the release:
mvn release:prepare -Papache-release -Pall -DautoVersionSubmodules=true -DdevelopmentVersion=X.Y.Z-incubating-SNAPSHOT -Darguments="-DcreateChecksum=true -DskipTests -Dmaven.javadoc.skip=true -Dgpg.passphrase=********"
mvn relase:perform -Papache-release -Pall -Darguments="-DcreateChecksum=true -DskipTests -Dmaven.javadoc.skip=true -Dgpg.passphrase=********"
Go to https://repository.apache.org to close the staging repository.
After voting on the dev@ list the release can be promoted.
Publish artifacts on svn:
svn co https://dist.apache.org/repos/dist/dev/incubator/samoa samoa-apache-dist
References
http://www.apache.org/dev/publishing-maven-artifacts.html
http://www.apache.org/dev/release-signing.html
http://incubator.apache.org/guides/release.html
http://vincent.demeester.fr/posts/2012-07-23-maven-release-gitflow/
https://github.com/apache/incubator-tinkerpop/blob/master/README.asciidoc