pmd/pmd_projectdocs_committers_releasing.html

2065 lines
66 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="keywords" content=" ">
<title>Release process | PMD Source Code Analyzer</title>
<link rel="stylesheet" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">-->
<link rel="stylesheet" href="css/modern-business.css">
<link rel="stylesheet" href="css/lavish-bootstrap.css">
<link rel="stylesheet" href="css/customstyles.css">
<link rel="stylesheet" href="css/theme-blue.css">
<link rel="stylesheet" href="css/pmd-customstyles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="js/jquery.navgoco.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
<script src="js/toc.js"></script>
<script src="js/customscripts.js"></script>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="" href="https://pmd.github.io/pmd/feed.xml">
<script>
$(document).ready(function() {
// Initialize navgoco with default options
$("#mysidebar").navgoco({
caretHtml: '',
accordion: true,
openClass: 'active', // open
save: false, // leave false or nav highlighting doesn't work right
cookie: {
name: 'navgoco',
expires: false,
path: '/'
},
slide: {
duration: 400,
easing: 'swing'
}
});
$("#collapseAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', false);
});
$("#expandAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', true);
});
});
</script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script>
$(document).ready(function() {
$("#tg-sb-link").click(function() {
$("#tg-sb-sidebar").toggle();
$("#tg-sb-content").toggleClass('col-md-9');
$("#tg-sb-content").toggleClass('col-md-12');
$("#tg-sb-icon").toggleClass('fa-toggle-on');
$("#tg-sb-icon").toggleClass('fa-toggle-off');
});
});
</script>
</head>
<body>
<!-- Content is offset by the height of the topnav bar. -->
<!-- There's already a padding-top rule in modern-business.css, but it apparently doesn't work on Firefox 60 and Chrome 67 -->
<div id="topbar-content-offset">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container topnavlinks">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="fa fa-home fa-lg navbar-brand" href="index.html">&nbsp;<span class="projectTitle"> PMD Source Code Analyzer Project</span></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<!-- toggle sidebar button -->
<li><a id="tg-sb-link" href="#"><i id="tg-sb-icon" class="fa fa-toggle-on"></i> Nav</a></li>
<!-- entries without drop-downs appear here -->
<li><a href="https://github.com/pmd/pmd/releases/latest" target="_blank">Download</a></li>
<li><a href="https://github.com/pmd/pmd" target="_blank">Fork us on github</a></li>
<!-- entries with drop-downs appear here -->
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
<!--comment out this block if you want to hide search-->
<li>
<!--start search-->
<div id="search-demo-container">
<input type="text" id="search-input" placeholder="search...">
<ul id="results-container"></ul>
</div>
<script src="js/jekyll-search.js" type="text/javascript"></script>
<script type="text/javascript">
SimpleJekyllSearch.init({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: 'search.json',
searchResultTemplate: '<li><a href="{url}" title="Release process">{title}</a></li>',
noResultsText: 'No results found.',
limit: 10,
fuzzy: true,
})
</script>
<!--end search-->
</li>
</ul>
</div>
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<div class="container-toc-wrapper">
<div class="container">
<div class="col-lg-12">&nbsp;</div>
<!-- Content Row -->
<div class="row">
<!-- Sidebar Column -->
<div class="col-md-3" id="tg-sb-sidebar">
<ul id="mysidebar" class="nav">
<li class="sidebarTitle">PMD 6.54.0</li>
<div class="sidebarTitleDate">Release date: 28-January-2023</div>
<li>
<a href="#">About</a>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="pmd_release_notes.html">Release notes</a></li>
<li><a href="pmd_next_major_development.html">PMD 7.0.0 development</a></li>
<li><a href="pmd_about_help.html">Getting help</a></li>
</ul>
</li>
<li>
<a href="#">User Documentation</a>
<ul>
<li><a href="pmd_userdocs_installation.html">Installation and basic CLI usage</a></li>
<li><a href="pmd_userdocs_making_rulesets.html">Making rulesets</a></li>
<li><a href="pmd_userdocs_configuring_rules.html">Configuring rules</a></li>
<li><a href="pmd_userdocs_best_practices.html">Best practices</a></li>
<li><a href="pmd_userdocs_suppressing_warnings.html">Suppressing warnings</a></li>
<li><a href="pmd_userdocs_incremental_analysis.html">Incremental analysis</a></li>
<li><a href="pmd_userdocs_cli_reference.html">PMD CLI reference</a></li>
<li><a href="pmd_userdocs_report_formats.html">PMD Report formats</a></li>
<li><a href="pmd_userdocs_3rdpartyrulesets.html">3rd party rulesets</a></li>
<li class="subfolders">
<a href="#">CPD reference</a>
<ul>
<li><a href="pmd_userdocs_cpd.html">Copy-paste detection</a></li>
<li><a href="pmd_userdocs_cpd_report_formats.html">CPD Report formats</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Extending PMD</a>
<ul>
<li><a href="pmd_userdocs_extending_writing_rules_intro.html">Introduction to writing rules</a></li>
<li><a href="pmd_userdocs_extending_your_first_rule.html">Your first rule</a></li>
<li><a href="pmd_userdocs_extending_writing_xpath_rules.html">XPath rules</a></li>
<li><a href="pmd_userdocs_extending_writing_java_rules.html">Java rules</a></li>
<li><a href="pmd_userdocs_extending_designer_reference.html">Rule designer reference</a></li>
<li><a href="pmd_userdocs_extending_defining_properties.html">Defining rule properties</a></li>
<li><a href="pmd_userdocs_extending_metrics_howto.html">Using and defining code metrics</a></li>
<li><a href="pmd_userdocs_extending_rule_guidelines.html">Rule guidelines</a></li>
<li><a href="pmd_userdocs_extending_testing.html">Testing your rules</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Tools / Integrations</a>
<ul>
<li><a href="pmd_userdocs_tools_maven.html">Maven PMD Plugin</a></li>
<li><a href="pmd_userdocs_tools_gradle.html">Gradle</a></li>
<li><a href="pmd_userdocs_tools_ant.html">Ant</a></li>
<li><a href="pmd_userdocs_tools_java_api.html">PMD Java API</a></li>
<li><a href="pmd_userdocs_tools_ci.html">CI integrations</a></li>
<li><a href="pmd_userdocs_tools.html">Other Tools / Integrations</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Rule Reference</a>
<ul>
<li class="subfolders">
<a href="#">Apex Rules</a>
<ul>
<li><a href="pmd_rules_apex.html">Index</a></li>
<li><a href="pmd_rules_apex_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_apex_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_apex_design.html">Design</a></li>
<li><a href="pmd_rules_apex_documentation.html">Documentation</a></li>
<li><a href="pmd_rules_apex_errorprone.html">Error Prone</a></li>
<li><a href="pmd_rules_apex_performance.html">Performance</a></li>
<li><a href="pmd_rules_apex_security.html">Security</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Ecmascript Rules</a>
<ul>
<li><a href="pmd_rules_ecmascript.html">Index</a></li>
<li><a href="pmd_rules_ecmascript_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_ecmascript_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_ecmascript_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">HTML Rules</a>
<ul>
<li><a href="pmd_rules_html.html">Index</a></li>
<li><a href="pmd_rules_html_bestpractices.html">Best Practices</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Java Rules</a>
<ul>
<li><a href="pmd_rules_java.html">Index</a></li>
<li><a href="pmd_rules_java_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_java_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_java_design.html">Design</a></li>
<li><a href="pmd_rules_java_documentation.html">Documentation</a></li>
<li><a href="pmd_rules_java_errorprone.html">Error Prone</a></li>
<li><a href="pmd_rules_java_multithreading.html">Multithreading</a></li>
<li><a href="pmd_rules_java_performance.html">Performance</a></li>
<li><a href="pmd_rules_java_security.html">Security</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Java Server Pages Rules</a>
<ul>
<li><a href="pmd_rules_jsp.html">Index</a></li>
<li><a href="pmd_rules_jsp_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_jsp_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_jsp_design.html">Design</a></li>
<li><a href="pmd_rules_jsp_errorprone.html">Error Prone</a></li>
<li><a href="pmd_rules_jsp_security.html">Security</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Maven POM Rules</a>
<ul>
<li><a href="pmd_rules_pom.html">Index</a></li>
<li><a href="pmd_rules_pom_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Modelica Rules</a>
<ul>
<li><a href="pmd_rules_modelica.html">Index</a></li>
<li><a href="pmd_rules_modelica_bestpractices.html">Best Practices</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">PLSQL Rules</a>
<ul>
<li><a href="pmd_rules_plsql.html">Index</a></li>
<li><a href="pmd_rules_plsql_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_plsql_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_plsql_design.html">Design</a></li>
<li><a href="pmd_rules_plsql_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Salesforce VisualForce Rules</a>
<ul>
<li><a href="pmd_rules_vf.html">Index</a></li>
<li><a href="pmd_rules_vf_security.html">Security</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Scala Rules</a>
<ul>
<li><a href="pmd_rules_scala.html">Index</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">VM Rules</a>
<ul>
<li><a href="pmd_rules_vm.html">Index</a></li>
<li><a href="pmd_rules_vm_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_vm_design.html">Design</a></li>
<li><a href="pmd_rules_vm_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">WSDL Rules</a>
<ul>
<li><a href="pmd_rules_wsdl.html">Index</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">XML Rules</a>
<ul>
<li><a href="pmd_rules_xml.html">Index</a></li>
<li><a href="pmd_rules_xml_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">XSL Rules</a>
<ul>
<li><a href="pmd_rules_xsl.html">Index</a></li>
<li><a href="pmd_rules_xsl_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_xsl_performance.html">Performance</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Language Specific Documentation</a>
<ul>
<li><a href="pmd_languages_jsp.html">JSP Support</a></li>
<li class="subfolders">
<a href="#">Java Support</a>
<ul>
<li><a href="pmd_languages_java.html">Java Versions</a></li>
<li><a href="pmd_java_metrics_index.html">Java Code Metrics</a></li>
</ul>
</li>
<li><a href="pmd_apex_metrics_index.html">Apex code metrics</a></li>
<li><a href="pmd_languages_plsql.html">PLSQL</a></li>
<li><a href="pmd_languages_visualforce.html">Visualforce</a></li>
<li><a href="pmd_languages_xml.html">XML and XML dialects</a></li>
<li><a href="pmd_languages_html.html">HTML</a></li>
<li><a href="pmd_languages_gherkin.html">Gherkin</a></li>
</ul>
</li>
<li>
<a href="#">Developer Documentation</a>
<ul>
<li><a href="pmd_devdocs_development.html">Developer resources</a></li>
<li><a href="pmd_devdocs_building.html">Building PMD from source</a></li>
<li><a href="https://github.com/pmd/pmd/blob/master/CONTRIBUTING.md" target="_blank">Contributing</a></li>
<li><a href="pmd_devdocs_writing_documentation.html">Writing documentation</a></li>
<li><a href="pmd_devdocs_roadmap.html">Roadmap</a></li>
<li><a href="pmd_devdocs_how_pmd_works.html">How PMD works</a></li>
<li><a href="pmd_devdocs_pmdtester.html">Pmdtester</a></li>
<li><a href="pmd_devdocs_rule_deprecation_policy.html">Rule Deprecation Policy</a></li>
<li class="subfolders">
<a href="#">Major contributions</a>
<ul>
<li><a href="pmd_devdocs_major_rule_guidelines.html">Rule Guidelines</a></li>
<li><a href="pmd_devdocs_major_adding_new_language.html">Adding a new language</a></li>
<li><a href="pmd_devdocs_major_adding_new_cpd_language.html">Adding a new CPD language</a></li>
<li><a href="pmd_devdocs_major_adding_new_metrics_framework.html">Adding metrics support to a language</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Experimental features</a>
<ul>
<li><a href="pmd_devdocs_experimental_ast_dump.html">Creating (XML) dump of the AST</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Project documentation</a>
<ul>
<li class="subfolders">
<a href="#">Trivia about PMD</a>
<ul>
<li><a href="pmd_projectdocs_trivia_news.html">PMD in the press</a></li>
<li><a href="pmd_projectdocs_trivia_products.html">Products & books related to PMD</a></li>
<li><a href="pmd_projectdocs_trivia_similarprojects.html">Similar projects</a></li>
<li><a href="pmd_projectdocs_trivia_meaning.html">What does 'PMD' mean?</a></li>
</ul>
</li>
<li><a href="pmd_projectdocs_faq.html">FAQ</a></li>
<li><a href="license.html">License</a></li>
<li><a href="pmd_projectdocs_credits.html">Credits</a></li>
<li><a href="pmd_release_notes_old.html">Old release notes</a></li>
<li><a href="pmd_projectdocs_decisions.html">Decisions</a></li>
<li class="subfolders">
<a href="#">Project management</a>
<ul>
<li><a href="pmd_projectdocs_committers_infrastructure.html">Infrastructure</a></li>
<li class="active"><a href="pmd_projectdocs_committers_releasing.html">Release process</a></li>
<li><a href="pmd_projectdocs_committers_merging_pull_requests.html">Merging pull requests</a></li>
<li><a href="pmd_projectdocs_committers_main_landing_page.html">Main Landing page</a></li>
</ul>
</li>
</ul>
</li>
<!-- if you aren't using the accordion, uncomment this block:
<p class="external">
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
</p>
-->
</ul>
<!-- 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.-->
<script>$("li.active").parents('li').toggleClass("active");</script>
</div>
<!-- Content Column -->
<div class="col-md-9" id="tg-sb-content">
<header>
<div class="row">
<div class="col-lg-12">
<a href="./" role="button"
><i class="fa fa-home fa-lg"></i
></a>
» Release process
<a
target="_blank"
href="https://github.com/pmd/pmd/blob/master/docs/pages/pmd/projectdocs/committers/releasing.md"
class="pull-right"
role="button"
><i class="fa fa-github fa-lg"></i> Edit on GitHub</a
>
</div>
</div>
<hr />
</header>
<div class="post-header">
<h1 class="post-title-main">Release process</h1>
</div>
<div class="post-content" data-github-edit-url="https://github.com/pmd/pmd/blob/master/docs/pages/pmd/projectdocs/committers/releasing.md">
<div id="inline-toc"><!-- empty, move TOC here when screen size too small --></div>
<p>This page describes the current status of the release process.</p>
<p>Since versions 5.4.5 / 5.5.4 there is an automated release process using <a href="https://travis-ci.com">travis-ci</a>
in place. Since 6.30.0, the automated release process is using <a href="https://github.com/pmd/pmd/actions">Github Actions</a>.</p>
<p>However, there are still a few steps, that need manual examination.</p>
<h2 id="overview">Overview</h2>
<p>This page gives an overview which tasks are automated to do a full release of PMD. This knowledge is
required in order to verify that the release was successful or in case the automated process fails for
some reason. Then individual steps need to be executed manually. Because the build is reproducible, these
steps can be repeated again if the same tag is used.</p>
<p>The three main steps are:</p>
<ul>
<li>Preparations (which creates the tag) - use <code class="language-plaintext highlighter-rouge">do-release.sh</code> for that</li>
<li>The actual release (which is automated)</li>
<li>Prepare the next release (make sure the current main branch is ready for further development)</li>
</ul>
<h2 id="preparations">Preparations</h2>
<p>This is the first step. It is always manual and is executed locally. It creates in the end the tag from which
the release is created.</p>
<p>Make sure code is up to date and everything is committed and pushed with git:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ./mvnw clean
$ git pull
$ git status
</code></pre></div></div>
<p>As a help for the preparation task, the script <code class="language-plaintext highlighter-rouge">do-release.sh</code> guides you through the preparation tasks
and the whole release process. The script requires a specific source code folder and additional checkouts locally,
e.g. it requires that the repo <code class="language-plaintext highlighter-rouge">pmd.github.io</code> is checked out aside the main pmd repo:</p>
<ul>
<li><a href="https://github.com/pmd/pmd">https://github.com/pmd/pmd</a> ➡️ <code class="language-plaintext highlighter-rouge">/home/joe/source/pmd</code></li>
<li><a href="https://github.com/pmd/pmd.github.io">https://github.com/pmd/pmd.github.io</a> ➡️ <code class="language-plaintext highlighter-rouge">/home/joe/source/pmd.github.io</code></li>
</ul>
<p>The script <code class="language-plaintext highlighter-rouge">do-release.sh</code> is called in the directory <code class="language-plaintext highlighter-rouge">/home/joe/source/pmd</code> and searches for <code class="language-plaintext highlighter-rouge">../pmd.github.io</code>.</p>
<p>Also make sure, that the repo “pmd.github.io” is locally up to date and has no local changes.</p>
<h3 id="the-release-notes-and-docs">The Release Notes and docs</h3>
<p>Before the release, you need to verify the release notes: Does it contain all the relevant changes for the
release? Is it formatted properly? Are there any typos? Does it render properly?</p>
<p>As the release notes are part of the source code, it is not simple to change it afterwards. While the source
code for a tag cannot be changed anymore, the published release notes on the github releases pages or the
new posts can be changed afterwards (although thats an entirely manual process).</p>
<p>You can find the release notes here: <code class="language-plaintext highlighter-rouge">docs/pages/release_notes.md</code>.</p>
<p>The date (<code class="language-plaintext highlighter-rouge">date +%d-%B-%Y</code>) and the version (remove the SNAPSHOT) must be updated in <code class="language-plaintext highlighter-rouge">docs/_config.yml</code>, e.g.
in order to release version “6.34.0”, the configuration should look like this:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">pmd</span><span class="pi">:</span>
<span class="na">version</span><span class="pi">:</span> <span class="s">6.34.0</span>
<span class="na">previous_version</span><span class="pi">:</span> <span class="s">6.33.0</span>
<span class="na">date</span><span class="pi">:</span> <span class="s">24-April-2021</span>
<span class="na">release_type</span><span class="pi">:</span> <span class="s">minor</span>
</code></pre></div></div>
<p>The release type could be one of “bugfix” (e.g. 6.34.x), “minor” (6.x.0), or “major” (x.0.0).</p>
<p>The release notes usual mention any new rules that have been added since the last release.
Please double check the file <code class="language-plaintext highlighter-rouge">pmd-core/src/main/resources/rulesets/releases/&lt;version&gt;.xml</code>, so
that all new rules are listed.</p>
<p>Add the new rules as comments to the quickstart rulesets:</p>
<ul>
<li><code class="language-plaintext highlighter-rouge">pmd-apex/src/main/resources/rulesets/apex/quickstart.xml</code></li>
<li><code class="language-plaintext highlighter-rouge">pmd-java/src/main/resources/rulesets/java/quickstart.xml</code></li>
</ul>
<p>We maintain a documentation for the <a href="pmd_next_major_development.html">next major release</a>. Copy the API
changes from the current release notes to this document: <code class="language-plaintext highlighter-rouge">docs/pages/next_major_development.md</code>.</p>
<p>The designer lives at <a href="https://github.com/pmd/pmd-designer">pmd/pmd-designer</a>.
Update property <code class="language-plaintext highlighter-rouge">pmd-designer.version</code> in <strong>pom.xml</strong> to reference the latest pmd-designer release.
See <a href="https://search.maven.org/search?q=g:net.sourceforge.pmd%20AND%20a:pmd-ui&amp;core=gav">https://search.maven.org/search?q=g:net.sourceforge.pmd%20AND%20a:pmd-ui&amp;core=gav</a> for the available releases.</p>
<p>Starting with PMD 6.23.0 well provide small statistics for every release. This needs to be added
to the release notes as the last section. To count the closed issues and pull requests, the milestone
on github with the title of the new release is searched. Make sure, there is a milestone
on <a href="https://github.com/pmd/pmd/milestones">https://github.com/pmd/pmd/milestones</a>. The following snippet will
create the numbers, that can be attached to the release notes as a last section:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">LAST_VERSION</span><span class="o">=</span>6.33.0
<span class="nv">NEW_VERSION</span><span class="o">=</span>6.34.0
<span class="nv">NEW_VERSION_COMMITISH</span><span class="o">=</span>HEAD
<span class="nb">echo</span> <span class="s2">"### Stats"</span>
<span class="nb">echo</span> <span class="s2">"* </span><span class="si">$(</span>git log pmd_releases/<span class="k">${</span><span class="nv">LAST_VERSION</span><span class="k">}</span>..<span class="k">${</span><span class="nv">NEW_VERSION_COMMITISH</span><span class="k">}</span> <span class="nt">--oneline</span> <span class="nt">--no-merges</span> |wc <span class="nt">-l</span><span class="si">)</span><span class="s2"> commits"</span>
<span class="nb">echo</span> <span class="s2">"* </span><span class="si">$(</span>curl <span class="nt">-s</span> <span class="s2">"https://api.github.com/repos/pmd/pmd/milestones?state=all&amp;direction=desc&amp;per_page=5"</span>|jq <span class="s2">".[] | select(.title == </span><span class="se">\"</span><span class="nv">$NEW_VERSION</span><span class="se">\"</span><span class="s2">) | .closed_issues"</span><span class="si">)</span><span class="s2"> closed tickets &amp; PRs"</span>
<span class="nb">echo</span> <span class="s2">"* Days since last release: </span><span class="k">$((</span> <span class="o">(</span> <span class="si">$(</span><span class="nb">date</span> +%s<span class="si">)</span> <span class="o">-</span> <span class="si">$(</span>git log <span class="nt">--max-count</span><span class="o">=</span>1 <span class="nt">--format</span><span class="o">=</span><span class="s2">"%at"</span> pmd_releases/<span class="k">${</span><span class="nv">LAST_VERSION</span><span class="k">}</span><span class="si">)</span> <span class="o">)</span> <span class="o">/</span> <span class="m">86400</span><span class="k">))</span><span class="s2">"</span>
</code></pre></div></div>
<p>Note: this part is also integrated into <code class="language-plaintext highlighter-rouge">do-release.sh</code>.</p>
<p>Check in all (version) changes to branch master or any other branch, from which the release takes place:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ git commit -a -m "Prepare pmd release &lt;version&gt;"
$ git push
</code></pre></div></div>
<h3 id="the-homepage">The Homepage</h3>
<p>The github repo <code class="language-plaintext highlighter-rouge">pmd.github.io</code> hosts the homepage for <a href="https://pmd.github.io">https://pmd.github.io</a>.
All the following tasks are to be done in this repo.</p>
<p>The new version needs to be entered into <code class="language-plaintext highlighter-rouge">_config.yml</code>, e.g.:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">pmd</span><span class="pi">:</span>
<span class="na">latestVersion</span><span class="pi">:</span> <span class="s">6.34.0</span>
<span class="na">latestVersionDate</span><span class="pi">:</span> <span class="s">24-April-2021</span>
</code></pre></div></div>
<p>Also move the previous version down into the “downloads” section. We usually keep only the last 3 versions
in this list, so remove the oldest version.</p>
<p>Then create a new page for the new release, e.g. <code class="language-plaintext highlighter-rouge">_posts/2021-04-24-PMD-6.34.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>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ git commit -a -m "Prepare pmd release &lt;version&gt;"
$ git push
</code></pre></div></div>
<h2 id="the-actual-release">The actual release</h2>
<p>The actual release starts with one last local command: calling <strong>maven-release-plugin</strong>.</p>
<p>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><code class="language-plaintext highlighter-rouge">RELEASE_VERSION</code> is the version of the release. It is reused for the tag. <code class="language-plaintext highlighter-rouge">DEVELOPMENT_VERSION</code> is the
next snapshot version after the release.</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">RELEASE_VERSION</span><span class="o">=</span>6.34.0
<span class="nv">DEVELOPMENT_VERSION</span><span class="o">=</span>6.35.0-SNAPSHOT
./mvnw <span class="nt">-B</span> release:clean release:prepare <span class="se">\</span>
<span class="nt">-Dtag</span><span class="o">=</span>pmd_releases/<span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span> <span class="se">\</span>
<span class="nt">-DreleaseVersion</span><span class="o">=</span><span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span> <span class="se">\</span>
<span class="nt">-DdevelopmentVersion</span><span class="o">=</span><span class="k">${</span><span class="nv">DEVELOPMENT_VERSION</span><span class="k">}</span>
</code></pre></div></div>
<p>Once the maven plugin has pushed the tag, github actions will start and build a new version from this tag. Since
it is a tag build and a released version build, the build script will do a couple of additional stuff.
This is all automated in <code class="language-plaintext highlighter-rouge">.ci/build.sh</code>.</p>
<p>Here is, what happens:</p>
<ul>
<li>Deploy and release the build to maven central, so that it can be downloaded from
<a href="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 and the build doesnt fail for any other reason.
The plugin <a href="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 <a href="https://github.com/pmd/pmd/releases">https://github.com/pmd/pmd/releases</a>. It also uploads
the release notes from <code class="language-plaintext highlighter-rouge">docs/pages/release_notes.md</code>.
Note: The during the process, the release is a draft mode and not visible yet.
At the end of the process, the release will be published.</li>
<li>Upload the new binaries additionally to sourceforge, so that they can be downloaded from
<a href="https://sourceforge.net/projects/pmd/files/pmd/">https://sourceforge.net/projects/pmd/files/pmd/</a>, including the release notes.</li>
<li>Render the documentation in <code class="language-plaintext highlighter-rouge">docs/</code> with <code class="language-plaintext highlighter-rouge">bundle exec jekyll build</code> and create a zip file from it.</li>
<li>Upload the doc zip file to the current github release under <a href="https://github.com/pmd/pmd/releases">https://github.com/pmd/pmd/releases</a> and
to <a href="https://sourceforge.net/projects/pmd/files/pmd/">https://sourceforge.net/projects/pmd/files/pmd/</a>.</li>
<li>Upload the documentation to <a href="https://docs.pmd-code.org">https://docs.pmd-code.org</a>, e.g. <a href="https://docs.pmd-code.org/pmd-doc-6.34.0/">https://docs.pmd-code.org/pmd-doc-6.34.0/</a> and
create a symlink, so that <a href="https://docs.pmd-code.org/latest/">https://docs.pmd-code.org/latest/</a> points to the new version.</li>
<li>Remove the old snapshot documentation, e.g. so that <a href="https://docs.pmd-code.org/pmd-doc-6.34.0-SNAPSHOT/">https://docs.pmd-code.org/pmd-doc-6.34.0-SNAPSHOT/</a> is gone.
Also create a symlink from pmd-doc-6.34.0-SNAPSHOT to pmd-doc-6.34.0, so that old references still work, e.g.
<a href="https://docs.pmd-code.org/pmd-doc-6.34.0-SNAPSHOT/">https://docs.pmd-code.org/pmd-doc-6.34.0-SNAPSHOT/</a> points to the released version.</li>
<li>Deploy javadoc to “https://docs.pmd-code.org/apidocs/*/RELEASE_VERSION/”, e.g.
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.34.0/">https://docs.pmd-code.org/apidocs/pmd-core/6.34.0/</a>. This is done for all modules.</li>
<li>Remove old javadoc for the SNAPSHOT version, e.g. delete <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.34.0-SNAPSHOT/">https://docs.pmd-code.org/apidocs/pmd-core/6.34.0-SNAPSHOT/</a>.</li>
<li>Create a draft news post on <a href="https://sourceforge.net/p/pmd/news/">https://sourceforge.net/p/pmd/news/</a> for the new release. This contains the
rendered release notes.</li>
<li>Add the documentation of the new release to a subfolder on <a href="https://pmd.github.io">https://pmd.github.io</a>, also make
this folder available as <code class="language-plaintext highlighter-rouge">latest</code>, so that <a href="https://pmd.github.io/latest/">https://pmd.github.io/latest/</a> shows the new
version and <a href="https://pmd.github.io/pmd-6.34.0/">https://pmd.github.io/pmd-6.34.0/</a> is the URL for the specific release.</li>
<li>Also copy the documentation to sourceforges web space, so that it is available as
<a href="https://pmd.sourceforge.io/pmd-6.34.0/">https://pmd.sourceforge.io/pmd-6.34.0/</a>. All previously copied version are listed
under <a href="https://pmd.sourceforge.io/archive.phtml">https://pmd.sourceforge.io/archive.phtml</a>.</li>
<li>After all this is done, the release on github (<a href="https://github.com/pmd/pmd/releases">https://github.com/pmd/pmd/releases</a>) is published
and the news post on sourceforge (https://sourceforge.net/p/pmd/news/&gt; is publishes as well.</li>
<li>The new binary at <a href="https://sourceforge.net/projects/pmd/files/pmd/">https://sourceforge.net/projects/pmd/files/pmd/</a> is
selected as the new default for PMD.</li>
<li>As a last step, a new baseline for the <a href="https://github.com/pmd/pmd-regression-tester">regression tester</a>
is created and uploaded to <a href="https://pmd-code.org/pmd-regression-tester">https://pmd-code.org/pmd-regression-tester</a>.</li>
</ul>
<p>The release on github actions currently takes about 30-45 minutes. Once this is done, you can spread additional
news:</p>
<ul>
<li>
<p>Write an email to the mailing list</p>
<p>To: PMD Developers List <a href="mailto:pmd-devel@lists.sourceforge.net">pmd-devel@lists.sourceforge.net</a>
Subject: [ANNOUNCE] PMD <version> released</version></p>
<ul>
<li>Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F<version></version></li>
<li>Documentation: https://pmd.github.io/pmd-<version>/</version></li>
</ul>
<p>And Copy-Paste the release notes</p>
</li>
<li>
<p>Tweet about the new release</p>
</li>
</ul>
<p>Tweet on <a href="https://twitter.com/pmd_analyzer">https://twitter.com/pmd_analyzer</a>, eg.:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>PMD 6.34.0 released: https://github.com/pmd/pmd/releases/tag/pmd_releases/6.34.0 #PMD
</code></pre></div></div>
<h3 id="checklist">Checklist</h3>
<table>
<thead>
<tr>
<th>Task</th>
<th>Description</th>
<th>URL</th>
<th>☐ / ✔</th>
</tr>
</thead>
<tbody>
<tr>
<td>maven central</td>
<td>The new version of all artifacts are available in maven central</td>
<td><a href="https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/">https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>github releases</td>
<td>A new release with 3 assets (bin, src, doc) is created</td>
<td><a href="https://github.com/pmd/pmd/releases">https://github.com/pmd/pmd/releases</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>sourceforge files</td>
<td>The 3 assets (bin, src, doc) are uploaded, the new version is pre-selected as latest</td>
<td><a href="https://sourceforge.net/projects/pmd/files/pmd/">https://sourceforge.net/projects/pmd/files/pmd/</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>homepage</td>
<td>Main landing page points to new version, doc for new version is available</td>
<td><a href="https://pmd.github.io">https://pmd.github.io</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>homepage2</td>
<td>New blogpost for the new release is posted</td>
<td><a href="https://pmd.github.io/#news">https://pmd.github.io/#news</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>docs</td>
<td>New docs are uploaded</td>
<td><a href="https://docs.pmd-code.org/latest/">https://docs.pmd-code.org/latest/</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>docs-archive</td>
<td>New docs are also on archive site</td>
<td><a href="https://pmd.sourceforge.io/archive.phtml">https://pmd.sourceforge.io/archive.phtml</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>javadoc</td>
<td>New javadocs are uploaded</td>
<td><a href="https://docs.pmd-code.org/apidocs/">https://docs.pmd-code.org/apidocs/</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>news</td>
<td>New blogpost on sourceforge is posted</td>
<td><a href="https://sourceforge.net/p/pmd/news/">https://sourceforge.net/p/pmd/news/</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>regression-tester</td>
<td>New release baseline is uploaded</td>
<td><a href="https://pmd-code.org/pmd-regression-tester">https://pmd-code.org/pmd-regression-tester</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>mailing list</td>
<td>announcement on mailing list is sent</td>
<td><a href="https://sourceforge.net/p/pmd/mailman/pmd-devel/">https://sourceforge.net/p/pmd/mailman/pmd-devel/</a></td>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td>twitter</td>
<td>tweet about the new release</td>
<td><a href="https://twitter.com/pmd_analyzer">https://twitter.com/pmd_analyzer</a></td>
<td><input type="checkbox" /></td>
</tr>
</tbody>
</table>
<h2 id="prepare-the-next-release">Prepare the next release</h2>
<p>There are a couple of manual steps needed to prepare the current main branch for further development.</p>
<ul>
<li>Move any open issues to the next milestone, close the current milestone
on <a href="https://github.com/pmd/pmd/milestones">https://github.com/pmd/pmd/milestones</a> and create a new one for the next
version (if one doesnt exist already).</li>
<li>
<p>Update version in <strong>docs/_config.yml</strong>. Note - the next version needs to have a SNAPSHOT
in it otherwise the javadoc links wont work during development.</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">pmd</span><span class="pi">:</span>
<span class="na">version</span><span class="pi">:</span> <span class="s">6.35.0-SNAPSHOT</span>
<span class="na">previous_version</span><span class="pi">:</span> <span class="s">6.34.0</span>
<span class="na">date</span><span class="pi">:</span> <span class="s">??-??-2021</span>
<span class="na">release_type</span><span class="pi">:</span> <span class="s">minor</span>
</code></pre></div> </div>
</li>
<li>Prepare a new empty release notes. Note, this is done by <code class="language-plaintext highlighter-rouge">do-release.sh</code> already.
<ul>
<li>Move version/release info from <strong>docs/pages/release_notes.md</strong> to <strong>docs/pages/release_notes_old.md</strong>.</li>
<li>Update version/release info in <strong>docs/pages/release_notes.md</strong>. Use the following template:</li>
</ul>
</li>
</ul>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>---
title: PMD Release Notes
permalink: pmd_release_notes.html
keywords: changelog, release notes
---
## {{ site.pmd.date }} - {{ site.pmd.version }}
The PMD team is pleased to announce PMD {{ site.pmd.version }}.
This is a {{ site.pmd.release_type }} release.
{% tocmaker %}
### New and noteworthy
### Fixed Issues
### API Changes
### External Contributions
{% endtocmaker %}
</code></pre></div></div>
<p>Finally commit and push the changes:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ git commit -m "Prepare next development version"
$ git push origin master
</code></pre></div></div>
<h2 id="branches">Branches</h2>
<h3 id="merging">Merging</h3>
<p>If the release was done on a maintenance branch, such as <code class="language-plaintext highlighter-rouge">pmd/5.4.x</code>, then this branch should be
merged into the next “higher” branches, such as <code class="language-plaintext highlighter-rouge">pmd/5.5.x</code> and <code class="language-plaintext 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>
<h3 id="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. <code class="language-plaintext highlighter-rouge">pmd/5.4.x</code>, release from there. Then merge (see above) into the next branch, e.g. <code class="language-plaintext highlighter-rouge">pmd/5.5.x</code> and release
from there. Then merge into the <code class="language-plaintext highlighter-rouge">master</code> branch and release from there. This way, the last release done, becomes
automatically the latest release on <a href="https://pmd.github.io/latest/">https://pmd.github.io/latest/</a> and on sourceforge.</p>
<h3 id="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 <code class="language-plaintext highlighter-rouge">master</code> branch. Here are the steps:</p>
<ul>
<li>Create a new branch: <code class="language-plaintext highlighter-rouge">git branch pmd/5.6.x master</code></li>
<li>Update the version in both the new branch and master, e.g. <code class="language-plaintext highlighter-rouge">mvn versions:set -DnewVersion=5.6.1-SNAPSHOT</code>
and <code class="language-plaintext 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>
</ul>
<p>The maintenance or bugfix branch could also be created later when needed from the actual tag. Then only the version on
the maintenance branch needs to be set.</p>
<div class="tags">
</div>
</div>
<footer>
<hr />
<div>
This documentation is written in markdown. <br />
If there is something missing or can be improved, edit this page on
github and create a PR:
<a
target="_blank"
href="https://github.com/pmd/pmd/blob/master/docs/pages/pmd/projectdocs/committers/releasing.md"
role="button"
><i class="fa fa-github fa-lg"></i> Edit on GitHub</a
>
</div>
<hr />
<div class="row">
<div class="col-lg-12 footer">
&copy;2023 PMD Open Source Project. All rights
reserved. <br />
<span>Page last updated:</span>
April 2021<br /> Site last generated: Jan 28, 2023 <br />
<p>
<img src="images/pmd-logo-small.png" alt="Company
logo"/>
</p>
</div>
</div>
</footer>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<!-- Sticky TOC column -->
<div class="toc-col">
<div id="toc"></div>
</div>
<!-- /.toc-container-wrapper -->
</div>
</div>
</body>
</html>