Skip to content
Lincoln Baxter, III edited this page Oct 4, 2023 · 6 revisions

Releasing

CURRENT PROCESS

mvnw release:clean release:prepare -DskipTests=true -Darguments="-DskipTests=true -Dmaven.test.skip=true" -DdevelopmentVersion=X.Y.Z-SNAPSHOT -DreleaseVersion=X.Y.Z.Final -Dtag=X.Y.Z.Final
mvnw release:perform -DskipTests=true -Darguments="-DskipTests=true -Dmaven.test.skip=true" -Prelease-sign-artifacts,release

Prepare

If you belong to the (very small) group of people with a localized Git version, do this to work around MRELEASE-812:

$ export LANG=C

GPG

Prepare the GPG agent and use what to keep the GPG session alive

$ gpg2 --clearsign -o /dev/null /etc/issue 
$ watch "echo PING | gpg2 --clearsign"

Update everything

$ git checkout master
$ git fetch --all
$ git merge origin/master
$ git merge upstream/master

Create a release branch

$ git checkout -b release

Do the release

$ mvn clean release:clean
$ mvn release:prepare -Dgpg.executable=gpg2 -Darguments="-DskipTests"

What is the release version for "rewrite-parent"?          <---- Release version
What is SCM release tag or label for "rewrite-parent"?     <---- Just confirm the tag name
What is the new development version for "rewrite-parent"?  <---- Next SNAPSHOT version

$ mvn release:perform -Dgpg.executable=gpg2 -Darguments="-DskipTests"

Sonatype OSS

  • Close repository
  • Check that everything looks good
  • Release!

Generate distribution and javadocs (untested)

$ git checkout 2.0.0.Alpha4
$ mvn clean install javadoc:aggregate

Result:

  • target/site/apidocs
  • distribution/target/*.zip

Merge back to master

$ git checkout master
$ git merge release
$ git branch -d release
$ git push upstream
$ git push upstream --tags