First we release the main module with submodules.
First perform a dry run:
cd ~/xxxobjects/trunk/main mvn release:prepare -D dryRun=true
This will walk you through a dry run and you can view the temporary POMs it creates to verify you did everything correctly.
For example, when on 1.0-beta-3-SNAPSHOT the release plugin correctly guesses the release as 1.0-beta-3 and the next snapshot to be 1.0-beta-4-SNAPSHOT. You may need to override the release tag guess, specifically from "main-1.0-beta-3" to just "1.0-beta-3". There's no need for that "main" prefix; it is already specified in the path (and in mvn-release-plugin's tagBase configuration).
As a result of this dry run you'll see the following files:
release.properties
- copy of the
properties to be used
pom.xml.releaseBackup
- the
pom.xml
prior to any changes; identical to
pom.xml
since only done a dryRun
pom.xml.tag
- the
pom.xml
as it will look when tagged.
pom.xml.next
- the
pom.xml
as it will look for the next
iteration.
When ready, perform the prepare for real:
cd ~/xxxobjects/trunk/main mvn release:clean release:prepare
This will again ask for the values release values, defaulting
from release.properties
file:
This will:
remotely tag the project
increment the trunk's version, and commit
There are two different ways to deploy a release, either using the mvn-release-plugin or manually.
The mvn-release-plugin's perform goal reads the
information in release.properties
, then
checks out the newly created tag, does a mvn
deploy
, and does a mvn
site:deploy
.
Alternatively the above steps can be performed manually
In this section we concentrate only on the manual approach; it provides full with visibility of the tagged release before finally deploying it.
First, pull down the new tag:
cd ~/xxxobjects/tags/main svn update 1.0-beta-3
or whatever the release was just tagged.
Then, make sure that the code builds:
mvn clean install
Perform any last-minute verification.
The steps for deploying the release are essentially the same as deploying a snapshot. Essentially the steps are:
check deployment prerequisites (see Appendix A, Deployment Prerequisites)
switch to the documentation submodule:
cd documentation
rehearse the deployment by deploying locally, use:
mvn deploy -D dist=local
when happy, deploy the release remotely:
mvn deploy -D dist=remote
See Chapter 9, Deploying a Code Snapshot for more details if required