Fork me on GitHub


Following a quick reminder on how to do branching for a stable release.

It’s based on the 1.8 branching, fix the commands where needed. For details about each option please refer to the official documentation.

1. Test the command locally

$ mvn release:branch -DbranchName=1.8 \
  -DbranchBase= \
  -DupdateBranchVersions=true -DreleaseVersion=1.8.0-SNAPSHOT \

You will be prompted for the next trunk version. In our example: 1.10-SNAPSHOT.

Check that the following files contains the right versions

pom.xml.branch        # should be 1.8.0-SNAPSHOT          # should be 1.10-SNAPSHOT
pom.xml.releaseBackup # should be 1.8-SNAPSHOT

2. Revert the local changes

You’ll have a bunch of files locally that are not committed to svn. Just to have a clean situation clean up everything

$ svn st | grep '^?' | awk '{print $2}' | xargs rm

3. Actual branching

Re-execute the first command without the -DdryRun=true

$ mvn release:branch -DbranchName=1.8 \
  -DbranchBase= \
  -DupdateBranchVersions=true -DreleaseVersion=1.8.0-SNAPSHOT \

Now you can checkout the branch and proceed with the release as normal.

4. Final Checks and leftovers

release:branch will leave behind the oak-doc’s pom. You’ll have to manually update the version referring to the new oak-parent. See r1820738 for an example.