Version 3



    Sometimes it's necessary to branch the codebase before performing a project release.  For example, this is useful when the release process is time consuming and development needs to continue in the main branch.


    The  Maven Release Plugin (Branch Mojo) can be used to automate the process of branching the codebase prior to performing the actual release.  The benefits of performing this process is:


    1. Ensure new featuresets and development unnecessary for this release may continue as normal in trunk

    2. Isolate your release from unrelated development

    3. Provide easy mechanism to make subsequent minor revision releases (0.1.1.Beta1, 0.1.1.Beta2, etc) without increasing version number




    1. You should have write access to the current checked out repository of the project you are working on.
    2. Make sure you have properly configured the Maven Release Plugin in your POM.  This normally just involves checking the scm url fields.

    3. Ensure you have no local modifications to your working copy

    svn status


    Using the Maven Release Plugin


    Use the "branch" mojo of the maven release plugin.

    mvn release:branch -DbranchName=[project-name]-XX.YY.ZZ

    In most cases, "XX.YY.ZZ" is the same "XX.YY.ZZ-SNAPSHOT" currently defined in the trunk pom.xml.


    Maven will perform the appropriate SVN Copy commands, make your branch, and increment your local WC version number to a version you'll specify when prompted (there are intelligent defaults).


    After completion, you will need to perform a checkout from the new branch.  You may then follow the steps described in the JBoss Project Release Process to release from the local working copy of the newly-created Branch.


    Reference: Maven Release Plugin Branch Mojo


    Branching Manually


    If you do not want to use the Maven release plugin to create the branch, you can instead use the command line svn client.


    1. Update the versions in your project POMs (Update Maven Project Versions )
    2. Commit the changes to the versions (svn commit -m "Updating versions for branch x.y.x)
    3. Copy the remote trunk to the new branch
       svn copy
    1. Update the trunk versions back to the correct version.
    2. Commit the changes to trunk.