diff --git a/maven-plugin-pmd-build/config/m2.settings.xml b/maven-plugin-pmd-build/config/m2.settings.xml
index cf2ba7940d..290bb3e028 100644
--- a/maven-plugin-pmd-build/config/m2.settings.xml
+++ b/maven-plugin-pmd-build/config/m2.settings.xml
@@ -3,6 +3,21 @@
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ gpg-settings
+
+
+
+
+ gpg-settings
+
+
+ your-gpg-key
+ your-passphrase
+
+
+
+
diff --git a/pmd/etc/release_process.txt b/pmd/etc/release_process.txt
index 2650869d8c..8d8a78bbfc 100644
--- a/pmd/etc/release_process.txt
+++ b/pmd/etc/release_process.txt
@@ -8,10 +8,6 @@ $ svn status
Ensure all the new rules are listed in a rulesets/releases/.xml file.
-Update pom.xml:
-* remove "SNAPSHOT" from the version
-* make sure that scm/*connection are pointing to the subversion tag, that will be created soon.
-
Update the "download" and "what's new" link in navigation.xml.
Update version/release info in etc/changelog.txt.
@@ -26,20 +22,44 @@ Unzip and test manually (just to be on the safe side of the road):
Check in all (version) changes to trunk:
$ svn ci -m "pmd: Prepare pmd release "
-Create a tag from trunk:
-$ svn cp https://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_
+
+Let the 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.
+
+$ mvn release:branch -DbranchName=.x
+
+Now checkout the created branch.
+
+$ svn co https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/.x
+$ cd .x
+
+Now let maven create a release tag.
+
+$ mvn release:clean release:prepare
+
+The next command will checkout PMD from the tag just created and will build and deploy it
+to sonatype OSS repositories:
+
+$ mvn release:perform
+
Note:
-If you see a bug and fix it, you can delete the release using the following command (and then
-recreate the tag):
-$ svn delete https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_
+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-
-Update pom.xml in trunk:
-* increment the version and add "SNAPSHOT"
-* make sure that scm/*connection are pointing to trunk.
-Check in the changes to trunk:
-$ svn ci -m "pmd: Increment version to the next SNAPSHOT"
+Finally, in order to publish the release to Maven central, you need to release PMD via Sonatype Nexus:
+- Login to https://oss.sonatype.org/
+- Go to Staging Repositories page
+- Select a staging repository
+- Click the close button
+- Now you can download the artifacts again and verify they are working.
+- Once you are sure they are working, click "Release" and the artifacts are eventually available through maven central.
+
Public the release on sourceforge:
@@ -50,11 +70,11 @@ Public 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 tools/config/m2.settings.xml):
+(see the file available in ../../maven-plugin-pmd-build/config/m2.settings.xml):
$ ssh your_sf_login,pmd@shell.sourceforge.net create
...
-$ mvn source:jar javadoc:jar deploy -Psf-release (order of target DOES matter)
+$ 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)
diff --git a/pmd/pom.xml b/pmd/pom.xml
index 8d7d60ab10..508a2e70b5 100644
--- a/pmd/pom.xml
+++ b/pmd/pom.xml
@@ -223,7 +223,7 @@
scm:svn:https://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd
scm:svn:https://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd
- http://pmd.svn.sourceforge.net/viewvc/pmd/
+ http://pmd.svn.sourceforge.net/viewvc/pmd/trunk/pmd
InfoEther
@@ -456,6 +456,14 @@
+
+ org.apache.maven.plugins
+ maven-release-plugin
+
+ https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/
+ https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/
+
+
@@ -609,6 +617,44 @@
scp://shell.sourceforge.net/home/project-web/pmd/htdocs
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+ true
+
+
+
+