blob: a8499bfe3de67af80733343723a0b6ec0ee113bf [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="Date-Revision-yyyymmdd" content="20140918"/>
<meta http-equiv="Content-Language" content="en"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Building Normal Release</title>
<link href="//,400,600,700,400italic,600italic,700italic" rel="stylesheet" type="text/css">
<link href="//" rel="stylesheet">
<link href="/css/main.css" rel="stylesheet">
<link href="/css/custom.css" rel="stylesheet">
<link href="/highlighter/github-theme.css" rel="stylesheet">
<script src="//"></script>
<script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/js/community.js"></script>
<a href="" class="github-ribbon">
<img style="position: absolute; right: 0; border: 0;" src="" alt="Fork me on GitHub">
<div role="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" data-toggle="collapse" data-target="#struts-menu" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<a href="/index.html" class="navbar-brand logo"><img src="/img/struts-logo.svg"></a>
<div id="struts-menu" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Home<b class="caret"></b>
<ul class="dropdown-menu">
<li><a href="/index.html">Welcome</a></li>
<li><a href="/download.cgi">Download</a></li>
<li><a href="/releases.html">Releases</a></li>
<li><a href="/announce-2021.html">Announcements</a></li>
<li><a href="">License</a></li>
<li><a href="">Thanks!</a></li>
<li><a href="">Sponsorship</a></li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Support<b class="caret"></b>
<ul class="dropdown-menu">
<li><a href="/mail.html">User Mailing List</a></li>
<li><a href="">Issue Tracker</a></li>
<li><a href="/security.html">Reporting Security Issues</a></li>
<li class="divider"></li>
<li><a href="">Version Notes</a></li>
<li><a href="">Security Bulletins</a></li>
<li class="divider"></li>
<li><a href="/maven/project-info.html">Maven Project Info</a></li>
<li><a href="/maven/struts2-core/dependencies.html">Struts Core Dependencies</a></li>
<li><a href="/maven/struts2-plugins/modules.html">Plugin Dependencies</a></li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Documentation<b class="caret"></b>
<ul class="dropdown-menu">
<li><a href="/birdseye.html">Birds Eye</a></li>
<li><a href="/primer.html">Key Technologies</a></li>
<li><a href="/kickstart.html">Kickstart FAQ</a></li>
<li><a href="">Wiki</a></li>
<li class="divider"></li>
<li><a href="/getting-started/">Getting Started</a></li>
<li><a href="/security/">Security Guide</a></li>
<li><a href="/core-developers/">Core Developers Guide</a></li>
<li><a href="/tag-developers/">Tag Developers Guide</a></li>
<li><a href="/maven-archetypes/">Maven Archetypes</a></li>
<li><a href="/plugins/">Plugins</a></li>
<li><a href="/maven/struts2-core/apidocs/index.html">Struts Core API</a></li>
<li><a href="/tag-developers/tag-reference.html">Tag reference</a></li>
<li><a href="">FAQs</a></li>
<li><a href="">Plugin registry</a></li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Contributing<b class="caret"></b>
<ul class="dropdown-menu">
<li><a href="/youatstruts.html">You at Struts</a></li>
<li><a href="/helping.html">How to Help FAQ</a></li>
<li><a href="/dev-mail.html">Development Lists</a></li>
<li><a href="/contributors/">Contributors Guide</a></li>
<li class="divider"></li>
<li><a href="/submitting-patches.html">Submitting patches</a></li>
<li><a href="/builds.html">Source Code and Builds</a></li>
<li><a href="/coding-standards.html">Coding standards</a></li>
<li><a href="">Contributors Guide</a></li>
<li class="divider"></li>
<li><a href="/release-guidelines.html">Release Guidelines</a></li>
<li><a href="/bylaws.html">PMC Charter</a></li>
<li><a href="/volunteers.html">Volunteers</a></li>
<li><a href="">Source Repository</a></li>
<li><a href="/updating-website.html">Updating the website</a></li>
<li class="apache"><a href=""><img src="/img/apache.png"></a></li>
<article class="container">
<section class="col-md-12">
<a class="edit-on-gh" href="" title="Edit this page on GitHub">Edit on GitHub</a>
<a href="creating-and-signing-a-distribution" title="back to Creating and Signing a Distribution"><< back to Creating and Signing a Distribution</a>
<h1 class="no_toc" id="building-normal-release">Building Normal Release</h1>
<ul id="markdown-toc">
<li><a href="#getting-ready" id="markdown-toc-getting-ready">Getting ready</a></li>
<li><a href="#prepare-release" id="markdown-toc-prepare-release">Prepare release</a></li>
<li><a href="#perform-the-release" id="markdown-toc-perform-the-release">Perform the release</a></li>
<li><a href="#move-the-assemblies" id="markdown-toc-move-the-assemblies">Move the assemblies</a></li>
<li><a href="#announce-availability" id="markdown-toc-announce-availability">Announce availability</a></li>
<li><a href="#push-changes" id="markdown-toc-push-changes">Push changes</a></li>
<li><a href="#vote-on-it" id="markdown-toc-vote-on-it">Vote on it</a></li>
<li><a href="#copy-files" id="markdown-toc-copy-files">Copy files</a></li>
<li><a href="#promote-release" id="markdown-toc-promote-release">Promote release</a></li>
<li><a href="#clean-up-old-releases" id="markdown-toc-clean-up-old-releases">Clean up old releases</a></li>
<li><a href="#wait-for-rsync" id="markdown-toc-wait-for-rsync">Wait for rsync</a></li>
<li><a href="#update-site" id="markdown-toc-update-site">Update site</a></li>
<li><a href="#post-announcements" id="markdown-toc-post-announcements">Post announcements</a></li>
<h2 id="getting-ready">Getting ready</h2>
<li>Ensure that the master POM and Struts Annotations have current releases</li>
<li>Review JIRA for any issues without a fix version set, and for any issues that should be resolved for the pending release.</li>
<li>Ensure that there are no <code class="highlighter-rouge">repositories</code> or <code class="highlighter-rouge">pluginRepositories</code> listed in the poms.</li>
<li>Release the upcoming version in JIRA (under Administration/Manage Releases) and tag the release date</li>
<li>Add next milestone version to the JIRA roadmap</li>
<li>Create DONE and TODO filters for the new version, share with all, and remove obsolete TODO filter</li>
<li>Create a new Version Notes page in Confluence, link from <a href="">Migration Guide</a>,
and link to prior release page and JIRA DONE filters of the version to release</li>
<p>Please remember to keep BOM subproject in sync - <struts-version.version>X.X.X</struts-version.version> - must be
the same as the parent pom. The latest Maven version handles this case very well, but it’s worth checking if the bits
are in sync.</p>
<p>If needed, you can use <a href="">Versions Maven Plugin</a> to set -SNAPSHOT version
in all poms, like below:
<code class="highlighter-rouge">mvn versions:set -DnewVersion= -DgenerateBackupPoms=false</code></p>
<h2 id="prepare-release">Prepare release</h2>
<p>Tag the release by using the “release:prepare” goal of Maven:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mvn release:prepare -DautoVersionSubmodules=true
<p>For a <a href="">dry run</a>, add <code class="highlighter-rouge">-DdryRun=true</code>. If you do a dry
run, use <code class="highlighter-rouge">mvn release:clean</code> to clean up after you have looked at the output.</p>
<p>When prompted for the SCM tag name, follow this pattern: <code class="highlighter-rouge">STRUTS_2_5_[PATCH_VERSION]</code></p>
<p>If you get an error message, try to re-run <code class="highlighter-rouge">mvn release:prepare -DautoVersionSubmodules=true</code> command again,
-Dresume flag is set to true by default and the plugin will resume the release process from where it failed before.</p>
<p>Follow the link to get <a href="">more information</a>
about performed operation by release plugin.</p>
<h2 id="perform-the-release">Perform the release</h2>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mvn release:perform -DretryFailedDeploymentCount=10
<p>Follow the link to get <a href="">more information</a>
about performed operation by release plugin. After this step the artifacts will be hosted by <a href="">Nexus</a>.</p>
<p>The <code class="highlighter-rouge">-DretryFailedDeploymentCount=10</code> is needed when there are problems with network connection (used just in case).</p>
<p>If you need to run perform again, (or in a different box), do:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git checkout STRUTS_2_5_[PATCH_VERSION]
mvn javadoc:javadoc deploy --no-plugin-updates -DperformRelease=true -Papache-release
<p>Next, log in to <a href="">Nexus</a> and <strong>close</strong> staging repository.</p>
<p>Repository is identified by user name and public IP address, so if in meantime your IP changed, a new staging repository
will be created, so you must drop the old one (check the dates!) - if IP is the same, artifacts will be uploaded
to the same repository as first attempt.</p>
<h2 id="move-the-assemblies">Move the assemblies</h2>
<p>To simplify testing, the assemblies have to be moved to the <code class="highlighter-rouge">$VERSION</code> dir.</p>
<p>After closing repository in Nexus, check if the release files are available from staging repository as bellow:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$VERSION/
<p>In order to move the assemblies login to and execute the following code:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/sh</span>
<span class="c">#create the destination directory</span>
<span class="nb">echo</span> <span class="s2">"Creating working dir </span><span class="nv">$VERSION</span><span class="s2">"</span>
mkdir <span class="nv">$VERSION</span>
<span class="nb">cd</span> <span class="nv">$VERSION</span>
<span class="c"># get the distro</span>
<span class="nb">echo</span> <span class="s2">"Getting distro </span><span class="nv">$VERSION</span><span class="s2">"</span>
wget <span class="nt">-erobots</span><span class="o">=</span>off <span class="nt">-nv</span> <span class="nt">-l</span> 1 <span class="nt">--accept</span><span class="o">=</span>jar,zip,md5,sha1,asc <span class="nt">-r</span> <span class="nt">--no-check-certificate</span> <span class="nt">-nd</span> <span class="nt">-nH</span><span class="nv">$VERSION</span>
<span class="c"># rename files</span>
<span class="nb">echo</span> <span class="s2">"Renaming files"</span>
<span class="k">for </span>f <span class="k">in</span> <span class="k">*</span>2-assembly<span class="k">*</span>.zip<span class="k">*</span>
<span class="k">do
</span>mv <span class="nv">$f</span> <span class="sb">`</span><span class="nb">echo</span> <span class="nv">$f</span> | sed s/2-assembly//g<span class="sb">`</span>
<span class="k">done</span>
<span class="c"># remove unneeded files</span>
<span class="nb">echo</span> <span class="s2">"Removing uneeded files"</span>
<span class="k">for </span>f <span class="k">in </span>struts2-assembly-<span class="k">*</span>.pom<span class="k">*</span>
<span class="k">do
</span>rm <span class="nv">$f</span>
<span class="k">done</span>
<span class="c"># remove uneeded hashes</span>
<span class="nb">echo</span> <span class="s2">"Removing uneeded files"</span>
rm <span class="k">*</span>.md5
rm <span class="k">*</span>.sha1
<span class="c"># generates sha signatures</span>
<span class="nb">echo</span> <span class="s2">"Generating SHA signatures"</span>
<span class="k">for </span>f <span class="k">in</span> <span class="k">*</span>.zip
<span class="k">do
</span>shasum <span class="nt">-a</span> 256 <span class="nv">$f</span> <span class="o">&gt;</span> <span class="nv">$f</span>.sha256
shasum <span class="nt">-a</span> 512 <span class="nv">$f</span> <span class="o">&gt;</span> <span class="nv">$f</span>.sha512
<span class="k">done
</span><span class="nb">cd</span> ..
<span class="c"># checking out repo</span>
<span class="nb">echo</span> <span class="s2">"Publishing artifacts for test"</span>
svn <span class="nt">--no-auth-cache</span> co <span class="nt">--depth</span> empty struts-dev
mv <span class="nv">$VERSION</span> struts-dev/
<span class="nb">cd </span>struts-dev
svn add <span class="nt">--force</span> ./
svn <span class="nt">--no-auth-cache</span> commit <span class="nt">-m</span> <span class="s2">"Updates test release </span><span class="nv">$VERSION</span><span class="s2">"</span>
<span class="nb">cd</span> ..
rm <span class="nt">-r</span> struts-dev
<span class="nb">echo</span> <span class="s2">"Done!"</span>
<p>After this step artifacts are available for test here <a href=""></a></p>
<h2 id="announce-availability">Announce availability</h2>
<p>Send a short e-mail to <code class="highlighter-rouge">dev@struts.a.o</code> informing about the new packages and to give people enough time to test
the distribution (actual bits). Wait around a week before posting Vote. If no show-stoppers reported, start a vote thread
for build quality designation.</p>
<h2 id="push-changes">Push changes</h2>
<p>Do not forget to push your local changes to the Apache repo</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git push
<h2 id="vote-on-it">Vote on it</h2>
<p>Post a release/quality vote to the dev list (and <strong>only</strong> the dev list). The example mail is on <a href="sample-announcements">Sample announcements</a>
page. If the vote result is for an ASF release (i.e. not test build), update site, announce. If the vote result is for GA,
push to central.</p>
<h2 id="copy-files">Copy files</h2>
<p>After the vote, if the distribution is being mirrored (there was a favourable release vote) move all the artefacts from
<code class="highlighter-rouge">dev</code> folder into <code class="highlighter-rouge">release</code> folder:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>svn mv$VERSION/
<h2 id="promote-release">Promote release</h2>
<p>Log in again to <a href="">Nexus</a> and <strong>release</strong> the repository, it will be automatically
replicated across Maven Repositories. See <a href="">Releasing a Maven-based project</a>
for further details.</p>
<h2 id="clean-up-old-releases">Clean up old releases</h2>
<p>Remove the old files from under <a href=""></a>
to synchronise only the latest version with peers. All the files from <a href=""></a>
are always mirrored to <a href=""></a>. You can use the below command:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>svn del
<p>where <code class="highlighter-rouge">x</code> is the previous version to remove (or one more previous to keep current and one version back).</p>
<h2 id="wait-for-rsync">Wait for rsync</h2>
<p>Wait 2-4 hours before proceeding.</p>
<h2 id="update-site">Update site</h2>
<p>Make sure you have linked your Apache and Github account in Apache GitBox (Dual Master Git allowing you to directly
push to GitHub), see <a href=""></a></p>
<p>Please follow <a href="../updating-website">the guideline</a> how to update the website, below are additional steps that should be performed:</p>
<li>If a new DTD was defined, add it to <code class="highlighter-rouge">source/dtds</code></li>
<li>Update current version and release date in <code class="highlighter-rouge">struts-site/_config.yml</code></li>
<li>Update page source files
<li><code class="highlighter-rouge">struts-site/source/</code> (if applicable, refer also to corresponding security bulletin)</li>
<li><code class="highlighter-rouge">struts-site/source/downloads.html</code> (Prior Releases section)</li>
<li><code class="highlighter-rouge">struts-site/source/index.html</code> (some parts will updated automatically with values defined in <code class="highlighter-rouge">_config.yml</code>)</li>
<li>You can generate the website locally with Docker Jekyll image
<li>you must have Docker installed and running</li>
<li>if you are doing this the first time, download the official Struts image to build the site from
<a href=""></a></li>
<li>now you can use one of the bash scripts already provided in the <code class="highlighter-rouge">struts-site</code>:
<li><code class="highlighter-rouge"></code> - used with Bash</li>
<li><code class="highlighter-rouge"></code> - to use with Fish Shell (via <code class="highlighter-rouge">fish</code>)</li>
<li>now you can check the generated site at http://localhost:4000</li>
<p>Please remember about updating JavaDocs using a dedicated Jenkins job as described in <a href="../updating-website">the guideline</a>.</p>
<h2 id="post-announcements">Post announcements</h2>
<p>We leave this as the last step, once the artifacts have had time to sync up on the mirrors. Target it to:</p>
<p>samples are available at <a href="sample-announcements">Sample announcements</a> page.</p>
<footer class="container">
<div class="col-md-12">
Copyright &copy; 2000-2018 <a href="">The Apache Software Foundation </a>.
All Rights Reserved.
<div class="col-md-12">
Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts project logos are
trademarks of The Apache Software Foundation.
<div class="col-md-12">Logo and website design donated by <a href="">SoftwareMill</a>.</div>
<script>!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s); = id;
js.src = "//";
fjs.parentNode.insertBefore(js, fjs);
}(document, "script", "twitter-wjs");</script>
<script src="" async="async" defer="defer"></script>
<div id="fb-root"></div>
<script>(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); = id;
js.src = "//";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>