blob: a8499bfe3de67af80733343723a0b6ec0ee113bf [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<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="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic,600italic,700italic" rel="stylesheet" type="text/css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" 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="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/js/community.js"></script>
</head>
<body>
<a href="http://github.com/apache/struts" class="github-ribbon">
<img style="position: absolute; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub">
</a>
<header>
<nav>
<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">
Menu
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/index.html" class="navbar-brand logo"><img src="/img/struts-logo.svg"></a>
</div>
<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>
</a>
<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="http://www.apache.org/licenses/">License</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html">Thanks!</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
</ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Support<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/mail.html">User Mailing List</a></li>
<li><a href="https://issues.apache.org/jira/browse/WW">Issue Tracker</a></li>
<li><a href="/security.html">Reporting Security Issues</a></li>
<li class="divider"></li>
<li><a href="https://cwiki.apache.org/confluence/display/WW/Migration+Guide">Version Notes</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/WW/Security+Bulletins">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>
</ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Documentation<b class="caret"></b>
</a>
<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="https://cwiki.apache.org/confluence/display/WW/Home">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="https://cwiki.apache.org/confluence/display/WW/FAQs">FAQs</a></li>
<li><a href="http://cwiki.apache.org/S2PLUGINS/home.html">Plugin registry</a></li>
</ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
Contributing<b class="caret"></b>
</a>
<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="https://cwiki.apache.org/confluence/display/WW/Contributors+Guide">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="https://gitbox.apache.org/repos/asf?p=struts.git">Source Repository</a></li>
<li><a href="/updating-website.html">Updating the website</a></li>
</ul>
</li>
<li class="apache"><a href="http://www.apache.org/"><img src="/img/apache.png"></a></li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<article class="container">
<section class="col-md-12">
<a class="edit-on-gh" href="https://github.com/apache/struts-site/edit/master/source/contributors/building-normal-release.md" 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>
</ul>
<h2 id="getting-ready">Getting ready</h2>
<ol>
<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="https://cwiki.apache.org/confluence/display/WW/Migration+Guide">Migration Guide</a>,
and link to prior release page and JIRA DONE filters of the version to release</li>
</ol>
<blockquote>
<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>
</blockquote>
<blockquote>
<p>If needed, you can use <a href="http://mojo.codehaus.org/versions-maven-plugin/">Versions Maven Plugin</a> to set -SNAPSHOT version
in all poms, like below:
<code class="highlighter-rouge">mvn versions:set -DnewVersion=2.3.16.1-SNAPSHOT -DgenerateBackupPoms=false</code></p>
</blockquote>
<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
</code></pre></div></div>
<p>For a <a href="http://maven.apache.org/plugins/maven-release-plugin/usage.html">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>
<blockquote>
<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>
</blockquote>
<p>Follow the link to get <a href="http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html">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
</code></pre></div></div>
<p>Follow the link to get <a href="http://maven.apache.org/plugins/maven-release-plugin/examples/perform-release.html">more information</a>
about performed operation by release plugin. After this step the artifacts will be hosted by <a href="http://repository.apache.org/">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
</code></pre></div></div>
<p>Next, log in to <a href="http://repository.apache.org/">Nexus</a> and <strong>close</strong> staging repository.</p>
<blockquote>
<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>
</blockquote>
<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">https://dist.apache.org/repos/dist/dev/struts/$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>https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION/
</code></pre></div></div>
<p>In order to move the assemblies login to people.apache.org 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> https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/<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 https://dist.apache.org/repos/dist/dev/struts/ 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>
</code></pre></div></div>
<p>After this step artifacts are available for test here <a href="https://dist.apache.org/repos/dist/dev/struts/">https://dist.apache.org/repos/dist/dev/struts/</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
</code></pre></div></div>
<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 https://dist.apache.org/repos/dist/dev/struts/$VERSION/ https://dist.apache.org/repos/dist/release/struts/
</code></pre></div></div>
<h2 id="promote-release">Promote release</h2>
<p>Log in again to <a href="http://repository.apache.org/">Nexus</a> and <strong>release</strong> the repository, it will be automatically
replicated across Maven Repositories. See <a href="http://maven.apache.org/developers/release/apache-release.html">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="https://dist.apache.org/repos/dist/release/struts/">https://dist.apache.org/repos/dist/release/struts/</a>
to synchronise only the latest version with peers. All the files from <a href="https://dist.apache.org/repos/dist/release/struts/">https://dist.apache.org/repos/dist/release/struts/</a>
are always mirrored to <a href="http://archive.apache.org/dist/struts/">http://archive.apache.org/dist/struts/</a>. You can use the below command:</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>svn del https://dist.apache.org/repos/dist/release/struts/2.3.x/
</code></pre></div></div>
<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="https://gitbox.apache.org/setup/">https://gitbox.apache.org/setup/</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>
<ul>
<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
<ul>
<li><code class="highlighter-rouge">struts-site/source/announce.md</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>
</ul>
</li>
<li>You can generate the website locally with Docker Jekyll image
<ul>
<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="https://hub.docker.com/r/theapachestruts/struts-site-jekyll/">https://hub.docker.com/r/theapachestruts/struts-site-jekyll/</a></li>
<li>now you can use one of the bash scripts already provided in the <code class="highlighter-rouge">struts-site</code>:
<ul>
<li><code class="highlighter-rouge">docker-run.sh</code> - used with Bash</li>
<li><code class="highlighter-rouge">docker-run.fish</code> - to use with Fish Shell (via <code class="highlighter-rouge">fish docker-run.fish</code>)</li>
</ul>
</li>
<li>now you can check the generated site at http://localhost:4000</li>
</ul>
</li>
</ul>
<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>
<ul>
<li>user@struts.a.o</li>
<li>announcements@struts.a.o</li>
<li>announce@a.o</li>
</ul>
<p>samples are available at <a href="sample-announcements">Sample announcements</a> page.</p>
</section>
</article>
<footer class="container">
<div class="col-md-12">
Copyright &copy; 2000-2018 <a href="http://www.apache.org/">The Apache Software Foundation </a>.
All Rights Reserved.
</div>
<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>
<div class="col-md-12">Logo and website design donated by <a href="https://softwaremill.com/">SoftwareMill</a>.</div>
</footer>
<script>!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");</script>
<script src="https://apis.google.com/js/platform.js" 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);
js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</body>
</html>