Release Plan Help

Last modified by Ecaterina Moraru (Valica) on 2015/03/30 18:50

Contains instructions to perform various release steps in the Release Plans.

Initial CLIRR check

This initial step checks if the previous release cycle, or more recent bugfix releases done since, (1) have properly set the CLIRR xwiki.clirr.previous.version in the top level POM of xwiki-commons (for the branch you are currently releasing) AND (2) that there are no leftover CLIRR excludes from the previous releases.

(1) For example, if the current release to be made is for 4.2-milestone-3 and, in the meanwhile, there have been released bugfix versions for 4.1 (4.1.4 being the latest released), you need to ensure that the value for xwiki.clirr.previous.version is 4.1.4.

(2) When looking at the current CLIRR excludes in each top level project (xwiki-platform, xwiki-commons, etc.), you will generally see comments like "<!-- Remove the following excludes after we release the current version as final -->" at the beginning of a block/group of excludes. However, there might also be some leftover excludes, from previous releases that were unintentionally preserved and must be removed. These cases should be identified based on the comment or by using GitHub's blame view and looking at the time they were introduced, compared to the current version.

Note: to help you find pom.xml files with CLIRR excludes you can use:

xwiki-trunksgrep -H "clirr-maven-plugin" . -R --include=pom.xml --exclude-dir=target*

Verify JIRA issue

If there are opened JIRA issues for the version you are currently releasing (fixVersion is set to the current release), you have two options:

  1. The issue has no code committed yet (Commits tab shows nothing). In this case, you need to push the issue to the next development version. (e.g. fixVersion = 6.3-milestone-1 will be moved to fixVersion = 6.3-milestone-2)
  2. There is some code already committed (Commits tab is not empty). In this case, you need to contact the assigned developer of the issue and find out if the committed code is complete:
    1. If the code is complete, you can close the issue (or ask the dev to do it)
    2. If the code is not complete, you can close the issue and ask the dev to create a new issue for the remaining work to be done for the next version.

In all cases, all opened issues must be closed before the release can be done.

Log on Release machine

# Get on the maven CI master machine

# Get on the agent machine

Set up your identity

The first time

  • Configure your Github profile to add the SSH key of the agent so that the commits can be pushed to Github with your user (To get the agent SSH key, do cat ~/.ssh/ To verify it works, do the following on the agent machine: ssh -T It should reply with Hi <your user id>! You've successfully authenticated, but GitHub does not provide shell access..
  • Create your own GPG key if you don't already have one: gpg --gen-key
  • Import your GPG key:
    • On your local computer run: gpg --list-secret-keys
    • Export your key in a secret.key file: gpg --export-secret-keys «keyID» > secret.key where keyID is the 8 characters long hexadecimal string on the sec line
    • Copy the secret.key file to the agent machine (you may need to copy to first and then to agent-1-1)
      • From your local computer, upload the key to scp secret.key
      • From (/home/maven): scp secret.key hudsonagent@
        • You can remove the key from after you have uploaded it to agent-1-1.
        • In case the IP address of the agent written above is no longer correct, just connect to the maven CI master machine (as shown in the Log on Release machine section above), run the command alias and get the IP address from the line containing the "a1-1" alias (the one used to connect to the agent). It looks like alias a1-1='ssh hudsonagent@'. After that, please update this page emoticon_smile
    • On the agent machine, run gpg --import secret.key
      • Don't leave the key file on the agent or the maven machines. Run rm secret.key on both locations.
  • You need to have a .gitconfig.<yourusername> file. You can do that by copying one of the existing gitconfig file
  • Make sure your gitconfig file has the key signingkey in the [user] section (the value is your key id which you can get with gpg --list-secret-keys).
  • Copy your .gitconfig.<yourusername> file as the main gitconfig file: cp .gitconfig.<yourusername> .gitconfig

The other times

  • Configure your Github profile to add the SSH key of the agent so that the commits can be pushed to Github with your user (To get the agent SSH key, do cat ~/.ssh/ To verify it works, do the following on the agent machine: ssh -T It should reply with Hi <your user id>! You've successfully authenticated, but GitHub does not provide shell access..
  • Import your GPG key, run gpg --import secret.key
  • Copy your .gitconfig.<yourusername> file as the main gitconfig file: cp .gitconfig.<yourusername> .gitconfig

Update Release scripts

# Update the release script
hudsonagent@vagent-1-1-dev:~cd xwiki-dev-tools ; git pull --rebase ; cd ..
Do a git status to verify that there are not any committed but not pushed stuff lying around...

Update Translations

When you release a .x version (bug fix release), be very careful when you update translations because the new ones might concern new stuff introduced in the master branch. The issue is that the translations wiki does not support branches.

Perform the following steps:

  • Edit the file to set branch, if needed (e.g. do this only if you are performing a bugfix release like 6.1.1 on the stable-6.1.x branch and you are not working on master, which is 6.2-SNAPSHOT).:
  • Move to xwiki-trunks:
    hudsonagent@vagent-1-1-dev:~cd releases/xwiki-trunks/
  • Download the translations:
  • Review the changes for anything amiss, like spam in translations.
    • You need to go through each project (xwiki-platform, xwiki-enterprise, xwiki-rendering, xwiki-commons, etc)
    • Do a git status to spot changes (and the list of updated languages).
      • Do a git diff and visually review modified translation keys and spot problems (like spam). Do not spend too much time here, a quick scan is enough to spot obvious problems.
      • For new (untracked) translation files, you can view them individually with a standard cat <filePath> command.

        In case there are new translation files for GWT modules (xwiki-platform-gwt-user or xwiki-platform-wysiwyg-client), those languages need to be added to the corresponding GWT module descriptors:

        ## For xwiki-platform-gwt-user
        vim xwiki-platform-core/xwiki-platform-gwt/xwiki-platform-gwt-user/src/main/resources/org/xwiki/gwt/user/User.gwt.xml
        ## For xwiki-platform-wysiwyg-client
        vim xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/resources/org/xwiki/gwt/wysiwyg/Wysiwyg.gwt.xml

        ...and add the new language code to the existing list defined in the locale extended-property that looks similar to this:

        <extend-property name="locale" values="ca,cs,da,de,es,fr,it,lv,nl,pt_BR,ru,sk,sv,tr,zh,zh_TW" />
      • No need to do a git add at this point since it will be done for all projects below.
    • Collect the list of updated languages by looking at the language code of the modified/new translation files and update the Release Notes in the Translations section with these language codes.
  • Commit the translation changes:
    hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunks~/ commit
Be patient, this process takes some time

Build the release

Make sure you use the right version of Java for the branch you are releasing: ~/java symbolic link should target java7 for version >= XWiki 6.x and java6 for version < XWiki 6.x (for example version 5.4.3 is to be released with java6).

When releasing a Release Candidate (e.g. 6.2-rc-1), make sure that, when asked What is the next SNAPSHOT version?, you do not increment the snapshot version (i.e. you answer 6.2-SNAPSHOT instead of 6.3-SNAPSHOT or whatever suggestion you have). This is because the next step will ask you to create a stable branch where the final version (if this is the last RC we`re doing) will be released and there we need to keep the SNAPSHOT version to the current one.

If you have created the stable branch and are asked What is the next master version?, you will now increment the snapshot version (i.e. answer 6.3-SNAPSHOT) so that the master branch can move to the next development version.

Tip: Because the build process is a lenghty one (currently around 2 hours), it is a good idea to use the screen linux command. This is most helpful in case your Internet connection or electrical power drops. However, it is not in any way mandatory to use screen during the release.

Tip: running the release script will first ask you for your GPG key passphrase. If you mistype or enter a wrong passphrase, the release will fail to perform. You can test your passphrase locally running the following command : 

echo "test" | gpg --no-use-agent -o /dev/null --local-user <KEYID> -as - && echo "Passphrase is correct"

If for a reason or another you've made a mistake typing your passphrase in, you will need to delete (locally on the agent machine) the release branch and created tag before you can start over again.

If you get the following error then type export GPG_TTY=`tty` and then retry:

Connection refused
pinentry-curses: no LC_CTYPE known - assuming UTF-8
# Perform the release from the release sources

Release Candidate, Final or Bugfix releases

In case the version you've just build was a Release Candidate or a bugfix release (i.e. 6.2.3), there are some extra steps you need to perform, which are to:

  1. update the parent version and version properties
  2. (only for RC) update the continuous integration jobs to build the new stable version that you have just created trough the release of a RC version.

Update the parent version and version properties

  • For a RC release, the reason is this: This step is needed because master has now a new/incremented version but the parent (of top projects) and properties like commons.version are still using the old/previous version. To fix this, you need to run the following command on the master branch:
  • For a final or bugfix release, the motive is simply that, for some reason (which we need to determine and fix), the maven-release-plugin is not properly replacing the old snapshot versions with the new ones automatically, so we have to do it manually by running the command below on the bugfix branch (i.e. stable-6.2.x):
# Replace 4.2-SNAPSHOT with the old snapshot version that you have just released as a RC and '4.3-SNAPSHOT' with the new snapshot version to be used for development.
hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunksgrep "4.2-SNAPSHOT" . -R --exclude-dir=target* --include=pom.xml -l | xargs -i@ sed -i 's/4.2-SNAPSHOT/4.3-SNAPSHOT/g' @

If you somehow find yourself running this command (locally) on Mac OSX, it will not work. The correct command to execute for that OS is:

xwiki-trunksgrep "4.2-SNAPSHOT" . -R --exclude-dir=target* --include=pom.xml -l | xargs -I@ sed -i '' 's/4.2-SNAPSHOT/4.3-SNAPSHOT/g' @

Now go trough each top level project(xwiki-commons, xwiki-platform, etc...) and commit and push the local changes, using the message [release] Incremented parent versions and/or version properties for the next development iteration.

hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunkscd xwiki-commons
hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunks/xwiki-commonsgit diff
hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunks/xwiki-commonsgit commit -a -m "[release] Incremented parent versions and/or version properties for the next development iteration"
hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunks/xwiki-commonsgit pull --rebase
hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunks/xwiki-commonsgit push origin master
Try to automate this using the versions-maven-plugin

Update the continuous integration jobs

At this point, you have just created a new stable-x.y.z branch in the source repository where your version will achieve final version and will continue stabilizing trough bugfix versions, while the main development branch is done on the master branch.

However, the continuous integration jobs that are supposed to build the stable-x.y.z branch are not yet set up. They are still configured to build the previous stable branch (stable-x.y-1.z or stable-x-1.y.z). This means that you need to add the new jobs. Fortunately we have an automated script for this emoticon_wink

Go to , fill the parameter values and click on Run at the bottom right. 

Make sure that the script properly copies build triggers. Inspect the execution logs of the script and fix any missing build triggers in the copied jobs.

In case of failure while building

In our examples below, we are assuming that the xwiki-platform project just failed during the release, while the xwiki-commons and xwiki-rendering were successfullt released.

Go to the corresponding top level module, clean up and fix the build problem:

hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunkscd xwiki-platform
# Note: Make sure to set the VERSION environment variable to the version you are working to release, otherwise the restart-release script will fail.
hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunksexport VERSION='4.2-milestone-3'

To resume the build from the top level module that previously failed, you need to edit the script and comment out the previously successfully released top level modules.

hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunks/xwiki-platformcd ..
hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunksvim ~/

Go to the end of the file and scroll up, until you reach this section:

# Wrapper function that calls release_project for each XWiki project in order: commons, rendering, platform, enterprise, manager.
# This is the main function that is called when running the script.
function release_all() {

Inside this method, comment out the previously successful top level projects and leave uncommented the top level projects that still need to be released, including the one we are resuming from. Remember that in our example, we are resuming from xwiki-platform but xwiki-commons and xwiki-rendering were already successfully released, so we are skipping them:

 echo              "*****************************"
 echo -e "\033[1;32m    Releasing xwiki-commons\033[0m"
 echo              "*****************************"
#  release_project xwiki-commons
 echo              "*****************************"
 echo -e "\033[1;32m    Releasing xwiki-rendering\033[0m"
 echo              "*****************************"
#  release_project xwiki-rendering
 echo              "*****************************"
 echo -e "\033[1;32m    Releasing xwiki-platform\033[0m"
 echo              "*****************************"
  release_project xwiki-platform
 echo              "*****************************"
 echo -e "\033[1;32m    Releasing xwiki-enterprise\033[0m"
 echo              "*****************************"
  release_project xwiki-enterprise

Go back to the build step and re-launch the script to resume from where we left off.

Clean up identity

# Git identity
hudsonagent@vagent-1-1-dev:~cp .gitconfig.default .gitconfig

# GPG key
hudsonagent@vagent-1-1-dev:~gpg --delete-secret-and-public-keys `gpg --list-secret-keys | grep ^sec | cut -d/ -f2 | cut '-d ' -f1`

# Local changes to the release-scripts (, user/password in, etc.)
hudsonagent@vagent-1-1-dev:~cd xwiki-dev-tools
# Double check that you are not removing any improvement you have made to the release scripts that should be committed instead ;)
hudsonagent@vagent-1-1-dev:~/xwiki-dev-toolsgit status
hudsonagent@vagent-1-1-dev:~/xwiki-dev-toolsgit diff
hudsonagent@vagent-1-1-dev:~/xwiki-dev-toolsgit checkout .

error Then don't forget to remove the Agent's SSH Key from your Github Account.

Generate CLIRR Report

The CLIRR report is always recorded in the release notes compared to the most recent released final version. This means that in all the non-final versions that we release, we will not report the differences with the previously released milestone version (ex: diff between 4.2M2 and 4.2M3), but we will always compare with the latest final release (ex: 4.1.4) and we will make sure to explicitly mention it in the release notes.

This is different from what we do in the release notes for features, where we list differences even between non-final versions, but we believe that it is simpler for both the users and the developers to do it this way.


2012-07-12: This is not working and is currently disabled for the following reasons:
  • sometimes fail to generate correct CLIRR reports
  • The comments in the POM files above the CLIRR excludes are lost BUT we need to copy them in the CLIRR report in the Release notes
  • The script doesn't update the previous CLIRR version to compare too
  • The CLIRR excludes are not removed
  • New format for CLIRR ignores is not yet supported by the automated script

You must use the Manual strategy for now (see below).

The script run previously is supposed to have generated clirr.txt files at the root of each repository. Thus to get the full CLIRR report you would run:

# Collect API breakages (clirr reports)
hudsonagent@vagent-1-1-dev:~/releases/xwiki-trunkscat xwiki-commons/clirr.txt xwiki-rendering/clirr.txt xwiki-platform/clirr.txt xwiki-enterprise/clirr.txt


The following operations need to be performed on your local machine.
  • Checkout the tag you've just released for all Git repositories having java code (xwiki-commons, xwiki-rendering, xwiki-platform)
    cd xwiki-commons
    git fetch --tags
    # If you`re releasing 4.2-rc-1
    git checkout xwiki-commons-4.2-rc-1
  • For each repository root do the following on your local machine:
    • Find all CLIRR excludes:
      grep -l "<artifactId>clirr-maven-plugin</artifactId>" --include=pom.xml . -R --exclude-dir=target*
    • For each POM file found, copy/paste the exclude and ignored lists somewhere for later and remove them, but keep the following 2 excludes:
    • Get the CLIRR violations:
      mvn clirr:check -DfailOnError=false -DtextOutputFile=clirr.txt -Plegacy,integration-tests
      find . -name clirr.txt | xargs cat | grep ERROR | sed -r -e 's/(ERROR: [0-9]+: )|(\s+$)//g'
      find . -name clirr.txt -delete
      On some OS (like Mac OSX) use instead: find . -name clirr.txt | xargs cat | grep ERROR | sed  -E -e 's/(ERROR: [0-9]+: )|(\s+$)//g'
    • Copy the content of clirr.txt on the Release notes page and for each violation copy the explanation from the pom.xml's CLIRR section (where the excludes are located)
    • If this is not a final version (you`re releasing a milestone), discard your changes to the pom.xml files.
      git reset --hard HEAD
    • If this is a final version (including bugfix releases), you have to commit removals of exclusions you`ve just done in order to start fresh the next version.
      # Stash the changes you just did on the tag
      git stash
      # Switch to your branch
      # Assuming you are releasing 6.2.3. If you were releasing 6.3, use master instead
      git checkout stable-6.2.x
      # Pop, commit and push your previous changes to your branch
      git stash pop
      git commit -a -m "[misc] Removed clirr exclusion from the previous version"
      git push origin stable-6.2.x
  • If you are releasing a final version:
    • Checkout the xwiki-commons branch corresponding to your release (for example if you're releasing 4.1.3, checkout stable-4.1.x) and edit the top level pom.xml to update the xwiki.clirr.previous.version. Set the value to be your release you've just done.
    • Checkout master for xwiki-commons and edit the top level pom.xml to update the xwiki.clirr.previous.version. Set the value to be your release you've just done.

Push to OW2

  • Log on the Jenkins master machine: ssh
  • Go to the release script directory: cd xwiki-release-scripts
  • Create a Release notes file: vim releasenotes-<version>.txt (e.g. releasenotes-6.1-milestone-2.txt)
    This milestone contains a new mail API and module to replace the old mailsender plugin, Flamingo skin and Extension Manager improvements as well as various performances improvements and bug fixes.

    Full release notes available at
  • Upload to OW2 with ./ push_ow2 (Follow instructions)
    • In case there is a problem during the upload and some of the files are not uploaded correctly, you can repeat this step to properly upload all the files.
    • You will need an OW2 account with admin rights on the XWiki project for this step
    • You may experience an "Could not chdir to home directory ... No such file or directory" error message if your account is just minutes old. If so, give it about 10-20 minutes for the new account to properly be created. It may also help (though this is just guesswork based on personal experience) if you register a public SSH key in the account management. Repeat the upload step until the files are all uploaded.
  • Create the release on OW2 with: ./ update_ow2 (Follow instructions) Since OW2 forge is a unusable crap there is a good chance it does not fully work so you will have to do it by hand on
  • Verify all is ok by going to the XWiki project page on OW2. Specifically, verify that the pushed files can be downloaded before continuing with the release process as otherwise end users will get an error when trying to download XWiki.
After update_ow2 is executed it takes several minutes (or a few hours...) before the files are available from the

News on OW2

  • Publish the news on OW2 with: ./ announce_ow2 (Follow instructions)
  • Verify all is ok by going to the XWiki project page on OW2

Blog post on

Create a new blog post on You can use the same text that you`ve used in the OW2 release notes or otherwise have a look at the previous release blog posts for inspiration.

In order to display the new blog post in the "Latest Blog Posts" sections of the homepage, you need to refresh the document cache that is currently used. To do that, edit the macro object's code, look for the "cache" macro call and modify the "id" parameter's value (for instance from "latestBlogPostsCache3" to "latestBlogPostsCache4"). This will trigger a refresh on the homepage and the new blog post will be listed.

Announcement Mail

  • Send the announcement email to the users and devs list
  • Example email:
    • Subject: [ANN] XWiki <version> released
    • Content:
      The XWiki development team is proud to announce the availability of XWiki <version>.
      <short summary>

      You can download it here:

      Make sure to review the release notes:<short version>

      -The XWiki dev team

Announce on Twitter

To announce the new release on Twitter using`s account, you need first to create the link that will be published in the standard tweet. An example PURL looks like this: 


    • Create an account on
    • Ask for access from another committer to be able to create links under the /xwiki/rn/ path
  • Create the new PURL
    • Path: /xwiki/rn/<shortVersion> (ex: 42, 503, 51M2)
    • Target URL: <blogPostLink> (ex:
    • Maintainers IDs (one per line):


Connect to and run:

maven@maven:~cd ~/xwiki-release-scripts
maven@maven:~/xwiki-release-scripts./ announce_twitter

The announce_twitter command will extract the proper PURL to use in the twitter message, based on the VERSION that you are releasing.

Publish to Maven Central

XWiki Commons and XWiki Rendering need to be published to Maven Central. To do so we use Sonatype's sync. The strategy is to upload to the XWiki Staging repo on Sonatype's Nexus, to check the staged repo and then to promote it.

In order to be able to upload to Sonatype's Nexus you'll need to create an account on and then ask for publish rights (if you don't have them already) by posting a comment to .

  • Add the following in your settings.xml:
  • Add passphrase in settings.xml or pass it on command line using -Dgpg.passphrase=...:
  • in xwiki-commons and in xwiki-rendering, checked out the correct tag
    git pull --rebase --tags
    # If you`re releasing xwiki-commons-7.0
    git checkout xwiki-commons-7.0
  • in xwiki-commons and in xwiki-rendering, after having checked out the correct tag, run:
     mvn clean deploy -Prelease,legacy,standalone,integration-tests -DaltDeploymentRepository=sonatype-nexus-staging::default:: -DskipTests=true
  • Publish your public GPG key, if you have not already done so: gpg --keyserver hkp:// --send-key <keyID>
  • Then log in and perform the release steps as indicated on Sonatype's synchro doc.

Rebuild Debian Distribution

The XWiki Debian distribution is automatically rebuilt every day using a crontab on

However, in order for the Debian distribution to be ready when we announce a new version, it's a good thing to force rebuild it.

This is achieved by logging on with the maven user. Then run the script.

Be warned, this process takes some time (1.5h+) and should be done with the screen command.
Created by Vincent Massol on 2012/07/13 15:39

Get Connected