pmd/pmd_projectdocs_committers_releasing.html

2469 lines
80 KiB
HTML
Raw Permalink 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" type="text/css" href="assets/fontawesome-free-5.15.4-web/css/all.min.css">
<link rel="stylesheet" type="text/css" href="assets/bootstrap-4.5.2-dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="css/modern-business.css">
<link rel="stylesheet" type="text/css" href="css/customstyles.css">
<link rel="stylesheet" type="text/css" href="css/theme-green.css">
<link rel="stylesheet" type="text/css" href="css/pmd-customstyles.css">
<link rel="shortcut icon" href="images/logo/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/logo/favicon.ico" type="image/x-icon">
<link rel="alternate" type="application/rss+xml" title="" href="feed.xml">
</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-expand-lg fixed-top navbar-dark">
<div class="container topnavlinks">
<a class="navbar-brand fas fa-home fa-lg" href="index.html">&nbsp;<span class="projectTitle"> PMD Source Code Analyzer Project</span></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0"></ul>
<ul class="navbar-nav">
<!-- toggle sidebar button -->
<li class="nav-item"><a id="tg-sb-link" class="nav-link" href="#"><i id="tg-sb-icon" class="fas fa-toggle-on"></i> Nav</a></li>
<!-- entries without drop-downs appear here -->
<li class="nav-item"><a class="nav-link" href="https://github.com/pmd/pmd/releases/latest" target="_blank">Download</a></li>
<li class="nav-item"><a class="nav-link" 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.-->
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="search..." id="search-input">
<ul id="results-container"></ul>
</form>
</div>
</div>
</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 7.8.0-SNAPSHOT</li>
<div class="sidebarTitleDate">Release date: 29-November-2024</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_release_notes_pmd7.html">Release notes (PMD 7)</a></li>
<li><a href="pmd_about_help.html">Getting help</a></li>
<li><a href="pmd_about_release_policies.html">Release policies</a></li>
<li><a href="pmd_about_support_lifecycle.html">Support lifecycle</a></li>
</ul>
</li>
<li>
<a href="#">User Documentation</a>
<ul>
<li><a href="pmd_userdocs_migrating_to_pmd7.html">Migration Guide for PMD 7</a></li>
<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_rule_guidelines.html">Rule guidelines</a></li>
<li><a href="pmd_userdocs_extending_testing.html">Testing your rules</a></li>
<li><a href="pmd_userdocs_extending_ast_dump.html">Creating (XML) dump of the AST</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_bld.html">bld PMD Extension</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="#">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="#">JavaScript 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>
<li><a href="pmd_rules_ecmascript_performance.html">Performance</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Kotlin Rules</a>
<ul>
<li><a href="pmd_rules_kotlin.html">Index</a></li>
<li><a href="pmd_rules_kotlin_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_kotlin_errorprone.html">Error Prone</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_visualforce.html">Index</a></li>
<li><a href="pmd_rules_visualforce_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="#">Swift Rules</a>
<ul>
<li><a href="pmd_rules_swift.html">Index</a></li>
<li><a href="pmd_rules_swift_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_swift_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Velocity Template Language (VTL) Rules</a>
<ul>
<li><a href="pmd_rules_velocity.html">Index</a></li>
<li><a href="pmd_rules_velocity_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_velocity_design.html">Design</a></li>
<li><a href="pmd_rules_velocity_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_bestpractices.html">Best Practices</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_index.html">Overview</a></li>
<li><a href="pmd_languages_configuration.html">Language configuration</a></li>
<li><a href="pmd_languages_apex.html">Apex</a></li>
<li><a href="pmd_languages_cpp.html">C/C++</a></li>
<li><a href="pmd_languages_cs.html">C#</a></li>
<li><a href="pmd_languages_coco.html">Coco</a></li>
<li><a href="pmd_languages_dart.html">Dart</a></li>
<li><a href="pmd_languages_fortran.html">Fortran</a></li>
<li><a href="pmd_languages_gherkin.html">Gherkin</a></li>
<li><a href="pmd_languages_go.html">Go</a></li>
<li><a href="pmd_languages_html.html">HTML</a></li>
<li><a href="pmd_languages_java.html">Java</a></li>
<li><a href="pmd_languages_js_ts.html">JavaScript / TypeScript</a></li>
<li><a href="pmd_languages_jsp.html">JSP</a></li>
<li><a href="pmd_languages_julia.html">Julia</a></li>
<li><a href="pmd_languages_kotlin.html">Kotlin</a></li>
<li><a href="pmd_languages_lua.html">Lua</a></li>
<li><a href="pmd_languages_matlab.html">Matlab</a></li>
<li><a href="pmd_languages_modelica.html">Modelica</a></li>
<li><a href="pmd_languages_objectivec.html">Objective-C</a></li>
<li><a href="pmd_languages_perl.html">Perl</a></li>
<li><a href="pmd_languages_php.html">PHP</a></li>
<li><a href="pmd_languages_plsql.html">PLSQL</a></li>
<li><a href="pmd_languages_python.html">Python</a></li>
<li><a href="pmd_languages_ruby.html">Ruby</a></li>
<li><a href="pmd_languages_scala.html">Scala</a></li>
<li><a href="pmd_languages_swift.html">Swift</a></li>
<li><a href="pmd_languages_tsql.html">T-SQL</a></li>
<li><a href="pmd_languages_visualforce.html">Visualforce</a></li>
<li><a href="pmd_languages_velocity.html">Velocity Template Language (VTL)</a></li>
<li><a href="pmd_languages_xml.html">XML and XML dialects</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/main/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_javacc.html">Adding a new language (JavaCC)</a></li>
<li><a href="pmd_devdocs_major_adding_new_language_antlr.html">Adding a new language (ANTLR)</a></li>
<li><a href="pmd_devdocs_major_adding_new_cpd_language.html">Adding a new CPD language</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Experimental features</a>
<ul>
<li><a href="tag_experimental.html">List of experimental Features</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_logo.html">Logo</a></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>
</ul>
</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/main/docs/pages/pmd/projectdocs/committers/releasing.md"
class="float-right"
role="button"
><i class="fab 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/main/docs/pages/pmd/projectdocs/committers/releasing.md">
<details id="inline-toc-details">
<summary>Table of Contents</summary>
<div id="inline-toc"><!-- empty, move TOC here when screen size too small --></div>
</details>
<p>This page describes the current status of the release process.</p>
<p>Since 6.30.0, the automated release process is using <a href="https://github.com/pmd/pmd/actions">Github Actions</a>.</p>
<p>Since 7.0.0-rc4, the release happens in two phases: First pmd-core with all the languages are released.
This allows to release then pmd-designer or any other project, that just depends on pmd-core and the
languages. And in the second phase, pmd-cli and pmd-dist are released. These include e.g. pmd-designer.</p>
<p>While the release is mostly automated, 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 if the same tag is used.</p>
<p>There is one special case in this project: As outlined above, the release of PMD consists of two phases or parts:</p>
<ol>
<li>All modules except pmd-cli and pmd-dist are released. That means, pmd-core and all the language modules
are released. This is, so that these libs can be used by pmd-designer to create a new release.</li>
<li>pmd-cli and pmd-dist are released after that. Both depend on pmd-designer, and this two-step release
process is used for now to break the cycling release dependency.</li>
</ol>
<p>The three main steps are:</p>
<ul>
<li>Preparations (which sets the versions and creates the tags) - use <code class="language-plaintext highlighter-rouge">do-release.sh</code> for that</li>
<li>The actual release (which is automated) - GitHub Actions will build the tags when they have been pushed.</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 that simple to change it afterward. While the source
code for a tag cannot be changed anymore, the published release notes on the GitHub Releases pages or the
news posts can be changed afterward (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 +%Y-%m-%d</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 “7.2.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">7.2.0</span>
<span class="na">previous_version</span><span class="pi">:</span> <span class="s">7.1.0</span>
<span class="na">date</span><span class="pi">:</span> <span class="s">2024-05-31</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. 7.2.x), “minor” (7.x.0), or “major” (x.0.0).</p>
<p>The release notes usually mention any new rules that have been added since the last release.</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>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 new version, that will be released
shortly. Note: This new version does at the moment not exist. That means, that a full build of the sources
will currently fail. Thats why the first phase of the release will build only pmd-core and languages but
not pmd-cli and pmd-dist.</p>
<p>In case, there is no need for a new pmd-designer version, we could stick to the latest already available version.
Then we can skip the release of pmd-designer and immediately start the second phase of the release.</p>
<p>Starting with PMD 7.5.0 we use Dependabot to update dependencies. Dependabot will create pull requests
labeled with <code class="language-plaintext highlighter-rouge">dependencies</code>. When we merge such a pull request, we should assign it to the correct
milestone. It is important, that the due date of the milestone is set correctly, otherwise the query wont find
the milestone number.
Then we can query which PRs have been merged and generate a section for the release notes:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">NEW_VERSION</span><span class="o">=</span>7.2.0
<span class="nv">MILESTONE_JSON</span><span class="o">=</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">)"</span><span class="si">)</span>
<span class="nv">MILESTONE</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$MILESTONE_JSON</span><span class="s2">"</span> | jq .number<span class="si">)</span>
<span class="c"># determine dependency updates</span>
<span class="nv">DEPENDENCIES_JSON</span><span class="o">=</span><span class="si">$(</span>curl <span class="nt">-s</span> <span class="s2">"https://api.github.com/repos/pmd/pmd/issues?labels=dependencies&amp;state=closed&amp;direction=asc&amp;per_page=50&amp;page=1&amp;milestone=</span><span class="k">${</span><span class="nv">MILESTONE</span><span class="k">}</span><span class="s2">"</span><span class="si">)</span>
<span class="nv">DEPENDENCIES_COUNT</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$DEPENDENCIES_JSON</span><span class="s2">"</span> | jq length<span class="si">)</span>
<span class="k">if</span> <span class="o">[</span> <span class="nv">$DEPENDENCIES_COUNT</span> <span class="nt">-gt</span> 0 <span class="o">]</span><span class="p">;</span> <span class="k">then
</span><span class="nb">echo</span> <span class="s2">"### 📦 Dependency updates"</span>
<span class="nb">echo</span> <span class="s2">"</span><span class="nv">$DEPENDENCIES_JSON</span><span class="s2">"</span> | jq <span class="nt">--raw-output</span> <span class="s1">'.[] | "* [#\(.number)](https://github.com/pmd/pmd/issues/\(.number)): \(.title)"'</span>
<span class="k">else
</span><span class="nb">echo</span> <span class="s2">"### 📦 Dependency updates"</span>
<span class="nb">echo</span> <span class="s2">"No dependency updates"</span>
<span class="k">fi</span>
</code></pre></div></div>
<p>This section needs to be added to the release notes at the end.</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 (after “Dependency updates”). To count the closed issues and pull requests, the milestone
on GitHub with the title of the new release is searched. It is important, that the due date of the milestone
is correctly set, as the returned milestones in the API call are sorted by due date.
Make sure, there is such 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. Note: It uses part of the
above code snippet (e.g. NEW_VERSION, MILESTONE, DEPENDENCIES_COUNT):</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">LAST_VERSION</span><span class="o">=</span>7.1.0
<span class="nv">NEW_VERSION_COMMITISH</span><span class="o">=</span>HEAD
<span class="nv">STATS_CLOSED_ISSUES</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$MILESTONE_JSON</span><span class="s2">"</span> | jq .closed_issues<span class="si">)</span>
<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="k">$((</span><span class="nv">$STATS_CLOSED_ISSUES</span> <span class="o">-</span> <span class="nv">$DEPENDENCIES_COUNT</span><span class="k">))</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: both shell snippets are also integrated into <code class="language-plaintext highlighter-rouge">do-release.sh</code>.</p>
<p>Check in all (version) changes to branch main 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">7.2.0</span>
<span class="na">latestVersionDate</span><span class="pi">:</span> <span class="s">31-May-2024</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/2024-05-31-PMD-7.2.0.md</code> and copy
the release notes into this page. This will appear under the news section.</p>
<p>Note: The release notes typically contain some Jekyll macros for linking to the rule pages. These macros wont
work in a plain markdown version. Therefore, you need to render the release notes first:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># install bundles needed for rendering release notes</span>
bundle config <span class="nb">set</span> <span class="nt">--local</span> path vendor/bundle
bundle config <span class="nb">set</span> <span class="nt">--local</span> with release_notes_preprocessing
bundle <span class="nb">install
</span><span class="nv">RELEASE_NOTES_POST</span><span class="o">=</span><span class="s2">"_posts/</span><span class="si">$(</span><span class="nb">date</span> <span class="nt">-u</span> +%Y-%m-%d<span class="si">)</span><span class="s2">-PMD-</span><span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span><span class="s2">.md"</span>
<span class="nb">echo</span> <span class="s2">"Generating ../pmd.github.io/</span><span class="k">${</span><span class="nv">RELEASE_NOTES_POST</span><span class="k">}</span><span class="s2">..."</span>
<span class="nv">NEW_RELEASE_NOTES</span><span class="o">=</span><span class="si">$(</span>bundle <span class="nb">exec </span>docs/render_release_notes.rb docs/pages/release_notes.md | <span class="nb">tail</span> <span class="nt">-n</span> +6<span class="si">)</span>
<span class="nb">cat</span> <span class="o">&gt;</span> <span class="s2">"../pmd.github.io/</span><span class="k">${</span><span class="nv">RELEASE_NOTES_POST</span><span class="k">}</span><span class="s2">"</span> <span class="o">&lt;&lt;</span><span class="no">EOF</span><span class="sh">
</span></code></pre></div></div>
<p>Check in all (version, blog post) changes to branch main:</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 is done by changing the versions, creating a tag and pushing this tag. Previously this was done
by calling <em>maven-release-plugin</em>, but these steps are done without the plugin to have more control. And since we
might reference a not yet released pmd-designer version, the test-build would fail.</p>
<p>We first change the version of PMD and all modules by basically removing the “-SNAPSHOT” suffix, building the changed
project locally with tests (and with skipping pmd-cli and pmd-dist) in order to be sure, everything is in working
order. Then the version changes are committed and a new release tag is created. Then, the versions are changed to
the next snapshot. As last step, everything is pushed.</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. Skipping the builds of pmd-cli and pmd-dist is done by setting
the property <code class="language-plaintext highlighter-rouge">skip-cli-dist</code>.</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">RELEASE_VERSION</span><span class="o">=</span>7.2.0
<span class="nv">DEVELOPMENT_VERSION</span><span class="o">=</span>7.3.0-SNAPSHOT
<span class="c"># Change version in the POMs to ${RELEASE_VERSION} and update build timestamp</span>
./mvnw <span class="nt">--quiet</span> versions:set <span class="nt">-DnewVersion</span><span class="o">=</span><span class="s2">"</span><span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span><span class="s2">"</span> <span class="nt">-DgenerateBackupPoms</span><span class="o">=</span><span class="nb">false</span> <span class="nt">-DupdateBuildOutputTimestampPolicy</span><span class="o">=</span>always
<span class="c"># Transform the SCM information in the POM</span>
<span class="nb">sed</span> <span class="nt">-i</span> <span class="s2">"s|&lt;tag&gt;.</span><span class="se">\+</span><span class="s2">&lt;/tag&gt;|&lt;tag&gt;pmd_releases/</span><span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span><span class="s2">&lt;/tag&gt;|"</span> pom.xml
<span class="c"># Run the project tests against the changed POMs to confirm everything is in running order (skipping cli and dist)</span>
./mvnw clean verify <span class="nt">-Dskip-cli-dist</span> <span class="nt">-Pgenerate-rule-docs</span>
<span class="c"># Commit and create tag</span>
git commit <span class="nt">-a</span> <span class="nt">-m</span> <span class="s2">"[release] prepare release pmd_releases/</span><span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span><span class="s2">"</span>
git tag <span class="nt">-m</span> <span class="s2">"[release] copy for tag pmd_releases/</span><span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span><span class="s2">"</span> <span class="s2">"pmd_releases/</span><span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span><span class="s2">"</span>
<span class="c"># Update POMs to set the new development version ${DEVELOPMENT_VERSION}</span>
./mvnw <span class="nt">--quiet</span> versions:set <span class="nt">-DnewVersion</span><span class="o">=</span><span class="s2">"</span><span class="k">${</span><span class="nv">DEVELOPMENT_VERSION</span><span class="k">}</span><span class="s2">"</span> <span class="nt">-DgenerateBackupPoms</span><span class="o">=</span><span class="nb">false</span> <span class="nt">-DupdateBuildOutputTimestampPolicy</span><span class="o">=</span>never
<span class="nb">sed</span> <span class="nt">-i</span> <span class="s2">"s|&lt;tag&gt;.</span><span class="se">\+</span><span class="s2">&lt;/tag&gt;|&lt;tag&gt;HEAD&lt;/tag&gt;|"</span> pom.xml
git commit <span class="nt">-a</span> <span class="nt">-m</span> <span class="s2">"[release] prepare for next development iteration"</span>
<span class="c"># Push branch and tag pmd_releases/${RELEASE_VERSION}</span>
git push origin <span class="s2">"</span><span class="k">${</span><span class="nv">CURRENT_BRANCH</span><span class="k">}</span><span class="s2">"</span>
git push origin tag <span class="s2">"pmd_releases/</span><span class="k">${</span><span class="nv">RELEASE_VERSION</span><span class="k">}</span><span class="s2">"</span>
</code></pre></div></div>
<p>Once we have pushed the tag, GitHub Actions take over and build a new version from this tag. Since
it is a tag build and a release version (version without SNAPSHOT), 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>Note: The property “skip-cli-dist” is activated, so this release command doesnt include pmd-cli and pmd-dist.
They will be released separately after pmd-designer is released. Since pmd-dist is not included in this first
step, no binaries are created yet.</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
the build doesnt fail for any reason. Note, that unit tests are not executed anymore, since they have been
run already locally before pushing the tag.
The plugin <a href="https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin">nexus-staging-maven-plugin</a>
is used to upload and publish the artifacts to maven central.</li>
<li>Create a draft release on GitHub and upload the release notes from <code class="language-plaintext highlighter-rouge">docs/pages/release_notes.md</code>.
Note: 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>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 (draft) 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-7.2.0/">https://docs.pmd-code.org/pmd-doc-7.2.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-7.2.0-SNAPSHOT/">https://docs.pmd-code.org/pmd-doc-7.2.0-SNAPSHOT/</a> is gone.
Also create a symlink from pmd-doc-7.2.0-SNAPSHOT to pmd-doc-7.2.0, so that old references still work, e.g.
<a href="https://docs.pmd-code.org/pmd-doc-7.2.0-SNAPSHOT/">https://docs.pmd-code.org/pmd-doc-7.2.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/7.2.0/">https://docs.pmd-code.org/apidocs/pmd-core/7.2.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/7.2.0-SNAPSHOT/">https://docs.pmd-code.org/apidocs/pmd-core/7.2.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>Copy the documentation to sourceforges web space, so that it is available as
<a href="https://pmd.sourceforge.io/pmd-7.2.0/">https://pmd.sourceforge.io/pmd-7.2.0/</a>. All previously copied versions are listed
under <a href="https://pmd.sourceforge.io/archive.phtml">https://pmd.sourceforge.io/archive.phtml</a>.</li>
</ul>
<p>The release on GitHub Actions currently takes about 30-45 minutes. Once this is done, you
can proceed with releasing pmd designer, see <a href="https://github.com/pmd/pmd-designer/blob/main/releasing.md">https://github.com/pmd/pmd-designer/blob/main/releasing.md</a>.
Make sure to release the version, you have used earlier for the property <code class="language-plaintext highlighter-rouge">pmd-designer.version</code>.</p>
<p>Once the pmd-designer release is done, you can proceed with part 2. This is simply triggering manually
a build on GitHub Actions: <a href="https://github.com/pmd/pmd/actions/workflows/build.yml">https://github.com/pmd/pmd/actions/workflows/build.yml</a> from the same tag again, but
with the parameter “build_cli_dist_only” set to “true”. With this parameter, the script <code class="language-plaintext highlighter-rouge">.ci/build.sh</code> will
perform the following steps:</p>
<ul>
<li>Build only modules pmd-cli and pmd-dist (via maven parameter <code class="language-plaintext highlighter-rouge">-pl pmd-cli,pmd-dist</code>).</li>
<li>Upload the new binaries to the existing draft GitHub Release under <a href="https://github.com/pmd/pmd/releases">https://github.com/pmd/pmd/releases</a>.</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>.</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 <a href="https://sourceforge.net/p/pmd/news/">https://sourceforge.net/p/pmd/news/</a> is published 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>Once this second GitHub Action run 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://docs.pmd-code.org/pmd-doc-<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>
<ul>
<li>Post the same twitter message into the gitter chat at <a href="https://matrix.to/#/#pmd_pmd:gitter.im">https://matrix.to/#/#pmd_pmd:gitter.im</a></li>
</ul>
<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>docs2</td>
<td>New version in the docs is listed under “Version specific documentation”</td>
<td><a href="https://docs.pmd-code.org/">https://docs.pmd-code.org/</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>
<tr>
<td>gitter</td>
<td>message about the new release</td>
<td><a href="https://matrix.to/#/#pmd_pmd:gitter.im">https://matrix.to/#/#pmd_pmd:gitter.im</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">7.3.0-SNAPSHOT</span>
<span class="na">previous_version</span><span class="pi">:</span> <span class="s">7.2.0</span>
<span class="na">date</span><span class="pi">:</span> <span class="s">2024-??-??</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 | date: "%d-%B-%Y" }} - {{ 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 main
</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">main</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">main</code> branch and release from there. This way, the last release done, becomes
automatically the latest release on <a href="https://docs.pmd-code.org/latest/">https://docs.pmd-code.org/latest/</a> and on sourceforge.</p>
<h3 id="optional-create-a-new-maintenance-branch">(Optional) Create a new maintenance branch</h3>
<p>At some point, it might be time for a new maintenance branch. Such a branch is usually created from
the tag. Here are the steps:</p>
<ul>
<li>Create a new branch: <code class="language-plaintext highlighter-rouge">git branch pmd/7.1.x pmd_releases/7.1.0</code></li>
<li>Update the version in both the new branch, e.g. <code class="language-plaintext highlighter-rouge">mvn versions:set -DnewVersion=7.1.1-SNAPSHOT</code>.</li>
<li>Update the release notes on both the new branch</li>
</ul>
<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/main/docs/pages/pmd/projectdocs/committers/releasing.md"
role="button"
><i class="fab fa-github fa-lg"></i> Edit on GitHub</a
>
</div>
<hr />
<div class="row">
<div class="col-lg-12 footer">
&copy;2024 PMD Open Source Project. All rights
reserved. <br />
<span>Page last updated:</span>
July 2024 (7.5.0)<br /> Site last generated: Nov 21, 2024 <br />
<p>
<img src="images/logo/pmd-logo-70px.png" alt="PMD
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>
<script type="application/javascript" src="assets/jquery-3.5.1/jquery-3.5.1.min.js"></script>
<script type="application/javascript" src="assets/anchorjs-4.2.2/anchor.min.js"></script>
<script type="application/javascript" src="assets/navgoco-0.2.1/src/jquery.navgoco.min.js"></script>
<script type="application/javascript" src="assets/bootstrap-4.5.2-dist/js/bootstrap.bundle.min.js"></script>
<script type="application/javascript" src="assets/Simple-Jekyll-Search-1.0.8/dest/jekyll-search.js"></script>
<script type="application/javascript" src="assets/jekyll-table-of-contents/toc.js"></script>
<script type="application/javascript" src="js/tabstate.js"></script>
<script type="application/javascript" src="js/customscripts.js"></script>
</body>
</html>