CINXE.COM

Overview ? Commons Release Plugin

<!DOCTYPE html> <!-- | Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/xdoc/index.xml at 17 Jan 2025 | Rendered using Apache Commons Skin --> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta charset="ISO-8859-1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="author" content="Apache Commons Team" /> <title>Overview ? Commons Release Plugin</title> <link rel="stylesheet" href="./css/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="./css/site.css" type="text/css" /> <link rel="stylesheet" href="./css/print.css" media="print" /> <script type="text/javascript" src="./js/jquery.min.js"></script> <script type="text/javascript" src="./js/bootstrap.min.js"></script> <script type="text/javascript" src="./js/prettify.min.js"></script> <script type="text/javascript" src="./js/site.js"></script> </head> <body class="composite"> <a href="https://commons.apache.org/" id="bannerLeft"> <img class="logo-left" src=" ./images/commons-logo.png " alt="Apache Commons logo"/> </a> <div class="clear"></div> <div class="navbar"> <div class="navbar-inner"> <div class="container-fluid"> <a class="brand" href="https://commons.apache.org/proper/commons-release-plugin/">Apache Commons Release Plugin &trade;</a> <ul class="nav"> <li id="publishDate">Last Published: 11 Jan 2025</li> <li class="divider">|</li> <li id="projectVersion">Version: 1.9.1-SNAPSHOT</li> </ul> <div class="pull-right"> <ul class="nav"> <li> <a href="https://www.apachecon.com/" class="externalLink" title="ApacheCon"> ApacheCon</a> </li> <li> <a href="https://www.apache.org" class="externalLink" title="Apache"> Apache</a> </li> <li> <a href="../../" title="Commons"> Commons</a> </li> </ul> </div> </div> </div> </div> <div class="container-fluid"> <table class="layout-table"> <tr> <td class="sidebar"> <div class="well sidebar-nav"> <ul class="nav nav-list"> <li class="nav-header">Release Plugin</li> <li class="none active"> <a href="index.html" title="Overview"> Overview</a> </li> <li class="none"> <a href="download_release-plugin.cgi" title="Download"> Download</a> </li> <li class="none"> <a href="changes.html" title="Release History"> Release History</a> </li> <li class="none"> <a href="plugin-info.html" title="Plugin Documentation"> Plugin Documentation</a> </li> <li class="none"> <a href="javadocs/api-release/index.html" title="Javadoc (Latest release)"> Javadoc (Latest release)</a> </li> <li class="expanded"> <a href="development.html" title="Help"> Help</a> <ul> <li class="none"> <a href="issue-tracking.html" title="Issue Tracking"> Issue Tracking</a> </li> <li class="none"> <a href="development.html" title="Development"> Development</a> </li> </ul> </li> </ul> <ul class="nav nav-list"> <li class="nav-header">Project Documentation</li> <li class="expanded"> <a href="project-info.html" title="Project Information"> Project Information</a> <ul> <li class="none active"> <a href="index.html" title="About"> About</a> </li> <li class="none"> <a href="summary.html" title="Summary"> Summary</a> </li> <li class="none"> <a href="team.html" title="Team"> Team</a> </li> <li class="none"> <a href="scm.html" title="Source Code Management"> Source Code Management</a> </li> <li class="none"> <a href="issue-management.html" title="Issue Management"> Issue Management</a> </li> <li class="none"> <a href="mailing-lists.html" title="Mailing Lists"> Mailing Lists</a> </li> <li class="none"> <a href="dependency-info.html" title="Maven Coordinates"> Maven Coordinates</a> </li> <li class="none"> <a href="dependency-management.html" title="Dependency Management"> Dependency Management</a> </li> <li class="none"> <a href="dependencies.html" title="Dependencies"> Dependencies</a> </li> <li class="none"> <a href="dependency-convergence.html" title="Dependency Convergence"> Dependency Convergence</a> </li> <li class="none"> <a href="ci-management.html" title="CI Management"> CI Management</a> </li> <li class="none"> <a href="distribution-management.html" title="Distribution Management"> Distribution Management</a> </li> </ul> </li> <li class="collapsed"> <a href="project-reports.html" title="Project Reports"> Project Reports</a> </li> </ul> <ul class="nav nav-list"> <li class="nav-header">Commons</li> <li class="none"> <a href="../../" title="Home"> Home</a> </li> <li class="none"> <a href="https://www.apache.org/licenses/" class="externalLink" title="License"> License</a> </li> <li class="collapsed"> <a href="../../components.html" title="Components"> Components</a> </li> <li class="collapsed"> <a href="../../sandbox/index.html" title="Sandbox"> Sandbox</a> </li> <li class="collapsed"> <a href="../../dormant/index.html" title="Dormant"> Dormant</a> </li> </ul> <ul class="nav nav-list"> <li class="nav-header">General Information</li> <li class="none"> <a href="../../security.html" title="Security"> Security</a> </li> <li class="none"> <a href="../../volunteering.html" title="Volunteering"> Volunteering</a> </li> <li class="none"> <a href="../../patches.html" title="Contributing Patches"> Contributing Patches</a> </li> <li class="none"> <a href="../../building.html" title="Building Components"> Building Components</a> </li> <li class="none"> <a href="../../commons-parent-pom.html" title="Commons Parent POM"> Commons Parent POM</a> </li> <li class="none"> <a href="../../build-plugin/index.html" title="Commons Build Plugin"> Commons Build Plugin</a> </li> <li class="none"> <a href="../../release-plugin/index.html" title="Commons Release Plugin"> Commons Release Plugin</a> </li> <li class="none"> <a href="../../site-publish.html" title="Site Publication"> Site Publication</a> </li> <li class="none"> <a href="../../releases/index.html" title="Releasing Components"> Releasing Components</a> </li> <li class="none"> <a href="https://cwiki.apache.org/confluence/display/commons/FrontPage" class="externalLink" title="Wiki"> Wiki</a> </li> </ul> <ul class="nav nav-list"> <li class="nav-header">ASF</li> <li class="none"> <a href="https://www.apache.org/foundation/how-it-works.html" class="externalLink" title="How the ASF works"> How the ASF works</a> </li> <li class="none"> <a href="https://www.apache.org/foundation/getinvolved.html" class="externalLink" title="Get Involved"> Get Involved</a> </li> <li class="none"> <a href="https://www.apache.org/dev/" class="externalLink" title="Developer Resources"> Developer Resources</a> </li> <li class="none"> <a href="https://www.apache.org/foundation/policies/conduct.html" class="externalLink" title="Code of Conduct"> Code of Conduct</a> </li> <li class="none"> <a href="https://privacy.apache.org/policies/privacy-policy-public.html" class="externalLink" title="Privacy"> Privacy</a> </li> <li class="none"> <a href="https://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"> Sponsorship</a> </li> <li class="none"> <a href="https://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"> Thanks</a> </li> </ul> </div> <div id="poweredBy"> <a href="https://www.apache.org/events/current-event.html" title="ApacheCon" class="builtBy"> <img class="builtBy" alt="ApacheCon" src="https://www.apache.org/events/current-event-125x125.png" /> </a> <a href="https://maven.apache.org/" title="Maven" class="builtBy"> <img class="builtBy" alt="Maven" src="https://maven.apache.org/images/logos/maven-feather.png" /> </a> </div> </td> <td class="content"> <section><a id="Release_Plugin"></a> <h1>Release Plugin</h1> <p> This is a <a href="http://maven.apache.org/" class="externalLink">Maven 3.x</a> Plugin which is used by <a href="https://commons.apache.org/" class="externalLink">Apache Commons</a> releases. See the <a href="development.html">Development</a> page for information to help maintain this plugin. </p> <p>The main purpose of the plugin is to automate the steps of our, namely The Apache Commons Project's, release process. Currently we have the mechanics for detaching distribution artifacts (i.e. all <code>tar.gz</code> artifacts and signatures as well as all <code>.zip</code> artifacts and signatures), creating a <code>site.zip</code> file, and staging all of those artifacts in a subversion repository (for the most part a subdirectory of <a href="https://dist.apache.org/repos/dist/dev/commons/" class="externalLink">https://dist.apache.org/repos/dist/dev/commons/</a>. It can, however, stage to any subversion repository. </p> </section> <section><a id="Plugin_Goals"></a> <h1>Plugin Goals</h1> <p> Available Goals (which are meant to be used together; the only reason they are separated is for code readability): </p> <ul> <li> <b>commons-release:detach-distributions</b> - Remove <code>tar.gz</code>, <code>tar.gz.asc</code>, <code>zip</code>, and <code>zip.asc</code> files from being uploaded to nexus and copy them to the <code>target/commons-release-plugin</code> directory. </li> <li> <b>commons-release:stage-distributions</b> - Take all staged files in the <code>target/commons-release-plugin</code> directory, and the <code>RELEASE-NOTES.txt</code> from the root of the project, and commit them to a specified staging subversion repository. </li> <li> <a href="vote-txt.html">commons-release:vote-txt</a> -Dcommons.nexus.repo.id=nnnn [-Dgit.tag.name] # where nnn is the number following orgapachecommons- in the Nexus 'Repository' column </li> </ul> </section> <section><a id="Using_the_plugin"></a> <h1>Using the plugin</h1> <p> Configure the plugin as the last plugin in the<code>&lt;build&gt;</code> section of the <code>pom.xml</code> </p> <p>N.B. This is now done in the Commons Parent POM, so is not needed in the component POM.</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;org.apache.commons&lt;/groupId&gt; &lt;artifactId&gt;commons-release-plugin&lt;/artifactId&gt; &lt;version&gt;1.8.0&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;clean-staging&lt;/id&gt; &lt;phase&gt;post-clean&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;clean-staging&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;detach-distributions&lt;/id&gt; &lt;phase&gt;verify&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;detach-distributions&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;stage-distributions&lt;/id&gt; &lt;phase&gt;deploy&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;stage-distributions&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p> The following properties need to be defined in the component POM if not already defined </p> <pre><code> &lt;properties&gt; &lt;!-- Previous version of the component (used for reporting binary compatibility check)--&gt; &lt;commons.bc.version&gt;m.n&lt;/commons.bc.version&gt; &lt;commons.release.isDistModule&gt;true&lt;/commons.release.isDistModule&gt; &lt;/properties&gt; </code></pre> <p> Ensure your Release Manager details are defined in your Maven <code>~/.m2/settings.xml</code> file (These are used by the vote-txt goal) Properties have to be defined in a profile. For example: </p> <pre><code> &lt;settings&gt; ... &lt;profiles&gt; ... &lt;profile&gt; &lt;id&gt;active-profile&lt;/id&gt; &lt;properties&gt; &lt;commons.releaseManagerName&gt;Your Name&lt;/commons.releaseManagerName&gt; &lt;commons.releaseManagerKey&gt;Your Signing Key Hex ID&lt;/commons.releaseManagerKey&gt; &lt;/properties&gt; &lt;/profile&gt; &lt;/profiles&gt; &lt;activeProfiles&gt; &lt;!-- define active profile name --&gt; &lt;activeProfile&gt;active-profile&lt;/activeProfile&gt; &lt;/activeProfiles&gt; ... &lt;/settings&gt; </code></pre> <p> After the above configuration performing the release would occur by (<i>note.</i> more in depth details can be found at <a href="https://commons.apache.org/releases/prepare.html" class="externalLink">Preparations For A Release</a>): </p> <ol style="list-style-type: decimal;"> <li>creating our release branch,</li> <li>checking compatibility,</li> <li>checking your dependencies,</li> <li>checking javadocs and code style,</li> <li>checking the apache license,</li> <li>configure the build to generate a complete set of release artifacts,</li> <li>preparing the release notes, updating the download file and other autogenerated files,</li> <li>tagging the release candidate, and</li> <li> running the following command: <pre><code> mvn -Duser.name=&lt;yourApacheId&gt; [-Duser.password=&lt;yourApacheIdsPassword] [-Dcommons.release.dryRun=true -Ptest-deploy] -Prelease clean test site deploy </code></pre> </li> </ol> To avoid specifying distribution credentials at the command line, consider using the <code>distServer</code> plugin configuration parameter (property <code>commons.distServer</code>) to specify a server definition in Maven <code>settings.xml</code> which defines your (encrypted, right?) authentication info. <p> If the component is new, then, before running this maven command, you would want to create the requisite subversion directory <code>https://dist.apache.org/repos/dist/dev/commons/foo</code>. Notice, that the way to perform a dry run of the release you need to include <code>-Dcommons.release.dryRun=true -Ptest-deploy</code>. </p> </section> </td> </tr> </table> </div> <div class="footer"> <p>Copyright &copy; 2018-2025 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</p> </div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10