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 Ambra+Topaz release, follow these steps:
- Make sure there are no dependencies (plugin or otherwise) on external artifacts (artifacts not part of the release operation) which have a SNAPSHOT version. If uncertain, you can try to create the release and prepare will tell you if there are any such dependencies.
- Check if you have no uncommitted changes in your working copy.
- 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). - Run
mvn release:perform -Ppackages,distribution
This will re-build the artifacts and deploy them to the maven repository. - 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.
Notes
- if you've set svn to not store your password, then you must provide it to release:prepare and release:perform with '-Dpassword=<passwd>' .
- after a dryRun, you may need to run mvn release:clean before repeating the release:prepare process
- you may need to run mvn clean install before release:prepare
Problems and solutions
- There is Subversion bug that can cause error at the end of release:prepare phase. Workaround: Tag failure: File already exists
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.
