How to make a release

Roman Ivanov edited this page Jun 30, 2018 · 281 revisions



Follow Sonatype setup, this includes :

  • Setup JIRA account, link, and request write access to repository (example).
  • Create a GPG key set and upload (example)
  • Setup ~/.m2/settings.xml to include the servers (instructions). Follow Maven guide on how to encrypt passwords

          <!-- "mvn release:prepare .... -Pgpg"
               and it is possible to skip " -Dgpg.passphrase=xxxx" at "-Darguments"
               Use "gpg \-\-list-keys", "pub   1024D/C6EED57A 2010-01-13"
                    to get "gpg.keyname" in example it is  value "C6EED57A"

Note how the id element in the server element in settings.xml is identical to the id elements in the snapshotRepository and repository element as well as the serverId configuration of the Nexus Staging Maven plugin (Server id is taken from our project parent pom file - ).

Before starting

  • verify that all CI are green, all CI badges should be green -
  • Verify that test release works fine on Travis:, search for “release dry run”.
  • Ensure your work space is in sync with Git.
  • Ensure that repository is cloned by ssh protocol.
  • Recheck that copyright is updated to recent year at:




    project (for ALL!!! to avoid build failures after release) :

find . -type f \( -name *.java -o -name *.header \) -exec sed -i  \
  "s/\/\/ Copyright (C) 2001-2015 the original author or authors./\/\/ Copyright (C) 2001-2016 the original author or authors./g" \
  {} +
  • Next version. Review all changes and if where is no new Checks or new options in Checks or any new functionality that might require updated in some Checkstyle plugins and integrations - please bump only 3rd digit of release number:
mvn versions:set -DnewVersion=6.4.1-SNAPSHOT && mvn versions:commit
git add pom.xml && git commit -m "config: update to 6.4.1-SNAPSHOT" && git push
Change milestone number in github - Most likely it is not required to update other repos with new version, as next version will be most likely bump in minor number, … but there could be failures in CIs…. .

Perform release build

ATTENTION: before providing password for SSH , verify that previous version and next versions are what you expect.


PREV_RELEASE=$(git describe $(git rev-list --tags --max-count=1) | sed "s/checkstyle-//")
curl -i -H "Authorization: token $TKN" \
  -d "{ \"tag_name\": \"checkstyle-$PREV_RELEASE\", \
        \"target_commitish\": \"master\", \
        \"name\": \"\", \
        \"body\": \"$PREV_RELEASE\", \
        \"draft\": false,   \"prerelease\": false }" \

RELEASE_ID=$(curl -s -X GET$PREV_RELEASE | jq ".id")
curl -i -H "Authorization: token $TKN" \
  -H "Content-Type: application/zip" \
  --data-binary @"target/checkout/target/checkstyle-$PREV_RELEASE-all.jar" \
  -X POST$RELEASE_ID/assets?name=checkstyle-$PREV_RELEASE-all.jar
Recheck release notes: .

Attention: if process is hanging on stage of version bump (scm plugin):

#stop the process (cntrl+c)
mvn release:rollback
git tag -d checkstyle-7.2
git push origin :refs/tags/checkstyle-7.2
Nuance - there will be some to-and-from commits in git history.

If you lost a moment when password was required to upload by `scp` to hosting, you can repeat by

mvn -e -Pgpg release:perform -Darguments='-Dcheckstyle.ant.skip=true -Dcheckstyle.skip=true -DskipNexusStagingDeployMojo=true'
and all further commands from release script should be done manually.

ATTENTION: Verify that the artifacts are automatically synchronized to the Maven Central Repository, Maven Search Engine. (beware that artifact appearance on maven central could take from 10 min to 2 hours) Syncing to Maven Central could take some time.

ATTENTION: do not proceed further till artifact appear in Maven Central Repository.

curl ""
one command to notify(in ubuntu) when version is accessible on maven central:
VERSION=$(git describe $(git rev-list --tags --max-count=1) | sed "s/checkstyle-//") && while [[ $(curl -s -o /dev/null -I -w "%{http_code}"$VERSION/) != 200 ]]; do sleep 60; done; notify-send "checkstyle $VERSION is accessible"

Update for HTML reports

Update for released version reference

update to new snapshot version:

update to point to new strict version of Checkstyle (WE need to recheck why “RELEASE” as version does not help us):

Final Checks

  • MANDATORY!!: Verify that build statuses are green to fix issues before announcements , ,,


create issue to release eclipse-cs

Create new issue on eclipse-cs on with title “upgrade to checkstyle 8.X” and description “”

Release checkstyle-sonar-plugin

Create new issue on checkstyle-sonar-plugin on with title “upgrade to checkstyle 8.X” and description “ , upgrade version at”

Do release