Create a branch

Creating a branch executes the following steps:

  • Check that there are no uncommitted changes in the sources
  • Change the version in the poms if you want to change it in the branch (you will be prompted for the versions to use)
  • Transform the SCM information in the POM to include the final destination of the tag
  • Commit the modified POMs
  • Tag the code in the SCM as a new branch with a version name (this will be prompted for)
  • Bump the version in the POMs if you want to change it to a new value y-SNAPSHOT (these values will also be prompted for)
  • Commit the modified POMs

To execute this step, run:

mvn release:branch

By default, versions in the new branch aren't modified and versions in the actual branch are updated. If you want to update versions in the new branch and not in the actual, run:

mvn release:branch -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false

Note: It can be useful if you want to create a branch from a tag