Table of Contents
We use the Maven release plugin to release petals modules.
mvn release:prepare -Denv=release -Dscm.username=<developer-login>
The previous command will execute:
Check that there are no uncommitted changes in the sources
Check that there are no SNAPSHOT dependencies
Change the version in the poms from x-SNAPSHOT to a new version (you will be prompted for the versions to use)
Transform the SCM information in the POM to include the final destination of the tag
Run the project tests against the modified POMs to confirm everything is in working order
Commit the modified POMs
Tag the code in the SCM with a version name (this will be prompted for)
Bump the version in the POMs to a new value y-SNAPSHOT (these values will also be prompted for)
Commit the modified POMs
You must provide :
The -Denv=release option to generate optimized classes
Your objectweb developer name that will be used for scm connection and in generated POM files
mvn release:perform -Denv=release
This command will execute :
Checkout from an SCM URL with optional tag
Run the predefined Maven goals to release the project (by default, deploy site-deploy)
You can get additional information on the release plugin page: http://maven.apache.org/plugins/maven-release-plugin/.
To release a single file (like a Maven POM file), follow these steps:
Change the POM version from SNAPSHOT to non SNAPSHOT. For example, if the current version is '2-SNAPSHOT', the new version will be '2'.
Check that there are no SNAPSHOT dependencies in the POM file.
Commit modified the POM file.
Tag this new POM file. If the artifactId is 'petals-module' and its version is '2', create a tag named 'petals-module-2' and put the POM file in this tag directory.
Change the POM version to next release iteration ('3-SNAPSHOT' for the current example).
Checkout the previously created tag from the SCM
Deploy the POM file to the maven repository:
mvn -N deploy:deploy-file -DrepositoryId=objectweb -Durl=scp://jupiter.objectweb.org:/var/lib/gforge/chroot/home/groups/maven/htdocs/maven2 -DpomFile=pom.xml -Dfile=pom.xml
When a module is released, a new tag is created under the tags SCM directory. For example, when the petals-component-framework v 2.0 module is released, the tags/petals-component-framework-2.0 directory is created under the SCM.
This tag MUST be used to create a branch for maintenance. The maintenance branch should have the same name as the tag one.
Once the branch is created, you have to modify the pom.xml file :
Set the version as maintenance SNAPSHOT. For example, a 2.0 version becomes 2.0.1-SNAPSHOT
Modify the SCM attributes. The maven release plugin has created SCM elements for the previously created tag. You have to change the URL to be the branch one.
You can now checkout the branch, and work on it as usual. The release process is the same as the trunk modules one.


PEtALS 2.0 & pack (2007/09/28)

