Apache Maven 1.x has reached its end of life, and is no longer supported. For more information, see the announcement. Users are encouraged to migrate to the current version of Apache Maven.

Making Releases from SCM

The SCM plugin provides some basic functionality for making releases, and updating the SCM accordingly. A release is performed in 2 steps:

  1. Prepare the release
  2. Perform (deploy) the release

Preparing the release

Release preparation usually happens on an existing checkout. This checkout should be in such a state that with the exception of making final updates to the project.xml and changes.xml files, is ready to be released.

Preparing a release performs the following steps:

  1. Verify that there are no uncommitted changes in the checkout
  2. Prompt for a desired version and tag name
  3. Modify project.xml and changes.xml to set the released version and commit the changes
  4. Tag the entire source tree with the new tag name

(Note that you may preview the changes made to project.xml and changes.xml by setting the maven.scm.testmode property). When this operation is over, your source control has the released code tagged and ready to deploy.

Performing the release

The release is performed directly from source control. So while you can run it from an existing checkout to pick up it's SCM URL, it is not necessary and can be run like a checkout:

maven scm:perform-release -Dmaven.scm.url=scm:cvs:local:/cvs/root:module -Dmaven.scm.tag=RELEASE_1_0

You will be prompted for the tag and goals if they are not specified. The goals you give are what are required to deploy the release - the SCM side is all taken care of. For example, you might select to run the goals:

jar:deploy,site:deploy

After prompting, scm:perform-release checks out a clean copy of the code from the tag, and runs the goals selected on the clean copy.