This page describes the current status of the release process.
Make sure code is up to date and everything is in svn:
$ mvn clean $ svn update $ svn status
Ensure all the new rules are listed in a src/main/resources/rulesets/releases/<version>.xml file.
Update the "download" and "what's new" link in site.pre.xml.
Update version/release info in etc/changelog.txt.
$ mvn verify post-site (order of targets DOES matter)
Unzip and test manually (just to be on the safe side of the road):
./bin/run.sh pmd ~/tmp/Test.java xml java-unusedcode ./bin/run.sh pmd ~/tmp/Test.java html rulesets/java/unusedcode.xml
Check in all (version) changes to trunk:
$ svn ci -m "pmd: Prepare pmd release <version>"
Let maven create a release branch (note - this is of course not needed if you are already on a release/maintenance branch). Maven will automatically increase the version in trunk. In case you create a alpha/preview release and you want to stay with the current version in trunk, use these additional properties: -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false
$ mvn release:branch -DbranchName=<version>.x
Now checkout the created branch.
$ svn co https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/<version>.x $ cd <version>.x
Now let maven create a release tag.
$ mvn release:clean release:prepare
Note: For the tag/label name we currently use this naming pattern: pmd_release_<major-version>_<minor-version>
The next command will checkout PMD from the tag just created and will build and deploy it to sonatype OSS repositories:
$ mvn release:perform
If you see a bug and fix it, you can rollback the release (see http://maven.apache.org/plugins/maven-release-plugin/examples/rollback-release.html):
$ mvn release:rollback
You probably need to delete the release tag manually using the following command (and then start again with release:clean release:prepare):
$ svn delete https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd-<version>
Finally, in order to publish the release to Maven central, you need to release PMD via Sonatype Nexus:
Publish the release on sourceforge:
Upload command below will create and upload the maven artifacts to sourceforge. Login info for 'pmd-repo' and 'pmd-site' must be defined in ~/.m2/settings.xml (see the file available in maven-plugin-pmd-build/config/m2.settings.xml):
$ ssh your_sf_login,firstname.lastname@example.org create ... $ mvn deploy -Psf-release
(In order to be able to upload the artifacts and the site to sourceforge, you need to have a interactive shell opened before)
Upload the site:
$ mvn site-deploy -Psf-release
Shutdown the sourceforge shell:
$ ssh email@example.com "shutdown"