<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
<p>The designer lives at <ahref="https://github.com/pmd/pmd-designer">pmd/pmd-designer</a>.
Update property <codeclass="highlighter-rouge">pmd-designer.version</code> in <strong>pom.xml</strong> to reference the latest pmd-designer release.
See <ahref="https://search.maven.org/search?q=g:net.sourceforge.pmd%20AND%20a:pmd-ui&core=gav">https://search.maven.org/search?q=g:net.sourceforge.pmd%20AND%20a:pmd-ui&core=gav</a> for the available releases.</p>
<p>Check in all (version) changes to branch master or any other branch, from which the release takes place:</p>
<divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>$ git commit -a -m "Prepare pmd release <version>"
$ git push
</code></pre></div></div>
<h3id="the-homepage">The Homepage</h3>
<p>The github repo <codeclass="highlighter-rouge">pmd.github.io</code> hosts the homepage for <ahref="https://pmd.github.io">https://pmd.github.io</a>.</p>
<p>The new version needs to be entered into <codeclass="highlighter-rouge">_config.yml</code>, e.g.:</p>
<p>Also move the previous version down into the “downloads” section.</p>
<p>Then create a new page for the new release, e.g. <codeclass="highlighter-rouge">_posts/2017-12-15-PMD-6.0.0.md</code> and copy
the release notes into this page. This will appear under the news section.</p>
<p>Check in all (version) changes to branch master:</p>
<divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>$ git commit -a -m "Prepare pmd release <version>"
$ git push
</code></pre></div></div>
<h2id="creating-the-release">Creating the release</h2>
<p>The release is created using the <strong>maven-release-plugin</strong>. This plugin changes the version by basically
removing the “-SNAPSHOT” suffix, builds the changed project locally, commits the version change, creates
a new tag from this commit, changes the version of the project to the next snapshot, commits this change
and pushes everything.</p>
<p><codeclass="highlighter-rouge">RELEASE_VERSION</code> is the version of the release. It is reused for the tag. <codeclass="highlighter-rouge">DEVELOPMENT_VERSION</code> is the
<p>Once the maven plugin has pushed the tag, travis-ci will start and build a new version from this tag. Since
it is a tag build and a released version build, travis-ci will do a couple of additional stuff:</p>
<ul>
<li>Deploy and release the build to maven central, so that it can be downloaded from
<ahref="https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/">https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/</a>. This is done automatically, if
all unit tests pass on travis-ci. The plugin <ahref="https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin">nexus-staging-maven-plugin</a> is used for that.</li>
<li>Upload the new binaries to github releases under <ahref="https://github.com/pmd/pmd/releases">https://github.com/pmd/pmd/releases</a>. It also uploads
the release notes.</li>
<li>Upload the new binaries additionally to sourceforge, so that they can be downloaded from
<ahref="https://sourceforge.net/projects/pmd/files/pmd/">https://sourceforge.net/projects/pmd/files/pmd/</a>, including the release notes. The new binaries are
selected as the new default downloads for PMD.</li>
<li>Add the documentation of the new release to a subfolder on <ahref="https://pmd.github.io">https://pmd.github.io</a>, also make
this folder available as <codeclass="highlighter-rouge">latest</code>.</li>
</ul>
<h2id="after-the-release">After the release</h2>
<p>The release on travis currently takes about 30 minutes. Once this is done, you can spread the news:</p>
<h3id="submit-a-news-on-sf">Submit a news on SF</h3>
<p>Submit news to SF on the <ahref="https://sourceforge.net/p/pmd/news/">PMD Project News</a> page. You can use
the following template:</p>
<divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>PMD <version> released
<divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>$ git commit -m "Prepare next development version"
$ git push origin master
</code></pre></div></div>
<h3id="close--create-new-milestones">Close / Create new milestones</h3>
<p>Manage the milestones under <ahref="https://github.com/pmd/pmd/milestones">https://github.com/pmd/pmd/milestones</a>.
Maybe there are some milestones on sourceforge, too: <ahref="https://sourceforge.net/p/pmd/bugs/milestones">https://sourceforge.net/p/pmd/bugs/milestones</a>.</p>
<h2id="branches">Branches</h2>
<h3id="merging">Merging</h3>
<p>If the release was done on a maintenance branch, such as <codeclass="highlighter-rouge">pmd/5.4.x</code>, then this branch should be
merged into the next “higher” branches, such as <codeclass="highlighter-rouge">pmd/5.5.x</code> and <codeclass="highlighter-rouge">master</code>.</p>
<p>This ensures, that all fixes done on the maintenance branch, finally end up in the other branches.
In theory, the fixes should already be there, but you never now.</p>
<h3id="multiple-releases">Multiple releases</h3>
<p>If releases from multiple branches are being done, the order matters. You should start from the “oldest” branch,
e.g. <codeclass="highlighter-rouge">pmd/5.4.x</code>, release from there. Then merge (see above) into the next branch, e.g. <codeclass="highlighter-rouge">pmd/5.5.x</code> and release
from there. Then merge into the <codeclass="highlighter-rouge">master</code> branch and release from there. This way, the last release done, becomes
automatically the latest release on <ahref="https://pmd.github.io/latest/">https://pmd.github.io/latest/</a> and on sourceforge.</p>
<h3id="optional-create-a-new-release-branch">(Optional) Create a new release branch</h3>
<p>At some point, it might be time for a new maintenance branch. Such a branch is usually created from
the <codeclass="highlighter-rouge">master</code> branch. Here are the steps:</p>
<ul>
<li>Create a new branch: <codeclass="highlighter-rouge">git branch pmd/5.6.x master</code></li>
<li>Update the version in both the new branch and master, e.g. <codeclass="highlighter-rouge">mvn versions:set -DnewVersion=5.6.1-SNAPSHOT</code>
and <codeclass="highlighter-rouge">mvn versions:set -DnewVersion=5.7.0-SNAPSHOT</code>.</li>
<li>Update the release notes on both the new branch and master</li>