Skip to content
Paul Millar edited this page May 23, 2014 · 12 revisions

Note The release process is being tweaked; please realize this is a guide, and not yet set in stone.

This page provides a step-by-step guide to creating a release. There is another page that describes when a release is made and with what content.

Create a Release Branch

Prior to a release, create a new release branch. All work toward the final release should occur on this branch.

For a significant release, branch on the minor version number. For example,

mvn release:branch -DbranchName=v2.0

You would then update the current trunk to version 2.1-SNAPSHOT and set the version on the v2.0 branch to 2.0-SNAPSHOT.

Next, switch to the 2.0 branch and create the 2.0.5 release branch:

mvn release:branch -DbranchName=v2.0.5

Make a Release Candidate

Prepare for a release:

mvn install

mvn release:prepare

You want the next release to be a release candidate - for example, "2.0.5-rc1". The tag name should be "v2.0.5-rc1". The next development version ought to be "2.0.5-rc2-SNAPSHOT".

Announce the release candidate on the Google Group list. Ask the group to test the tags and set a release date; by default, suggest 2 weeks from the time of the RC. Re-iterate until the group agrees the release is ready.

To stage a RC to maven central / sonatype, we will follow these procedures:

https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

Basically, you will want to do the following:

mvn release:perform

However, you need your Sonatype username and password in ~/.m2/settings.xml in order to perform this step. You can self-register a Sonatype ID but you will need to ask Brian for repository access.

Follow section 8a for information on how to synchronize the release candidate to Maven central.

Make an Actual Release

When the release is ready to be made, perform:

mvn release:prepare

mvn release:perform

Set the release name to "2.0.5"; the tag name to "v2.0.5"; and the development version to "2.0.5.1-SNAPSHOT". Despite the fact the release branch still exists, the next release should NOT be 2.0.5.1 but 2.0.6. No further releases should be done off this branch.

Congratulations! You've made a release!

Notes

If you want to do a step without running tests, do "-DskipTests=true". For example,

mvn install -DskipTests=true

For the prepare-release step, you need:

mvn -DpreparationGoals=clean release:prepare

For performing the release:

mvn -Darguments="-Dmaven.test.skip=true" release:perform

Use -DautoVersionSubmodules=true to skip the prompts for release versions for each module.