Performing a Release

The Theory

The basic steps are:

  mvn release:prepare
  mvn release:perform

The first will run various checks, prompt for version numbers and tags, then update all poms to the release version, commit, tag, update to next devel version, and commit again. The second command can be used to check out a tag, build, and deploy.

It is recommended to test things out first. This can be done by setting the dryRun property:

  mvn release:prepare -DdryRun=true

To deploy a newly cut release, you can either run release:perform from where you just did a release:prepare, or you can go to a fresh directory and run

  mvn release:perform -DconnectionUrl=scm:svn:http://svn.topazproject.org/svn/tags/<the-just-released-tag> -Dgoals=deploy

This will checkout the tag, build, and deploy.

When done, clean up with

  mvn release:clean

The Real McKoi

To cut a topaz+plosone release, make sure the Pre-Release Conditions below are met, and then follow these steps:

  1. Run 'mvn release:prepare -Ppackages,distribution' and answer the questions about the release version, the next development version, and the svn tag to use; after that it'll take about 30 minutes (mostly because of full build, including the rpms).
  2. Update various version and milestone information in Trac. This is extremely important as tickets need to be assigned to the correct milestone and version numbers. The general steps involved are to close a milestone, remove old -SNAPSHOT version and to add the release version number.

Done. You can copy the rpm's from the packages, or if you want to be really safe then rebuild them from the tag with

  mvn release:perform -Ppackages,distribution -DconnectionUrl=scm:svn:http://svn.topazproject.org/svn/tags/<the-just-released-tag> -Dgoals=install -Dpassword=<your-svn-passwd>

If you want to deploy all the jars/poms/etc to gandalf too, then use '-Dgoals=deploy' instead.

Notes

  • if you've set svn to not store your password, then you must provide it to release:prepare with '-Dpassword=<passwd>' .
  • after a dryRun, you may need to run mvn release:clean before repeating the prepare:release process
  • you may need to run mvn clean install before release:prepare

Pre-Release Conditions

There must be no dependencies (plugin or otherwise) on external artifacts (artifacts not part of the release operation) which have a SNAPSHOT version. Also, there may be no uncommitted changes in the working copy. These are to guarantee reproducibility of the build.

Project Considerations for Easy Releases

Ensure that all projects/modules in the build use the same version as this enables a simple build (see also [4994]).

Use profiles where different behaviour is needed during the cutting of a release; these can be enabled via the 'arguments' config to the release plugin. We have currently defined the 'release' profile for this.

Links: