http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/bind.html ---------------------------------------------------------------------- diff --git a/content/docs/bind.html b/content/docs/bind.html new file mode 100644 index 0000000..6554e61 --- /dev/null +++ b/content/docs/bind.html @@ -0,0 +1,194 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html> +<head> + <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css"> + <style type="text/css"> + .dp-highlighter { + width:95% !important; + } + </style> + <style type="text/css"> + .footer { + background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif'); + background-repeat: repeat-x; + background-position: left top; + padding-top: 4px; + color: #666; + } + </style> + <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' /> + <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' /> + <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushCss.js' type='text/javascript'></script> + <script type="text/javascript"> + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); + </script> + <script type="text/javascript" language="javascript"> + var hide = null; + var show = null; + var children = null; + + function init() { + /* Search form initialization */ + var form = document.forms['search']; + if (form != null) { + form.elements['domains'].value = location.hostname; + form.elements['sitesearch'].value = location.hostname; + } + + /* Children initialization */ + hide = document.getElementById('hide'); + show = document.getElementById('show'); + children = document.all != null ? + document.all['children'] : + document.getElementById('children'); + if (children != null) { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } + } + + function showChildren() { + children.style.display = 'block'; + show.style.display = 'none'; + hide.style.display = 'inline'; + } + + function hideChildren() { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } + </script> + <title>bind</title> +</head> +<body onload="init()"> +<table border="0" cellpadding="2" cellspacing="0" width="100%"> + <tr class="topBar"> + <td align="left" valign="middle" class="topBarDiv" align="left" nowrap> + <a href="home.html">Home</a> > <a href="guides.html">Guides</a> > <a href="tag-developers-guide.html">Tag Developers Guide</a> > <a href="struts-tags.html">Struts Tags</a> > <a href="tag-reference.html">Tag Reference</a> > <a href="ui-tag-reference.html">UI Tag Reference</a> > <a href="bind.html">bind</a> + </td> + <td align="right" valign="middle" nowrap> + <form name="search" action="https://www.google.com/search" method="get"> + <input type="hidden" name="ie" value="UTF-8" /> + <input type="hidden" name="oe" value="UTF-8" /> + <input type="hidden" name="domains" value="" /> + <input type="hidden" name="sitesearch" value="" /> + <input type="text" name="q" maxlength="255" value="" /> + <input type="submit" name="btnG" value="Google Search" /> + </form> + </td> + </tr> +</table> + +<div id="PageContent"> + <div class="pageheader" style="padding: 6px 0px 0px 0px;"> + <!-- We'll enable this once we figure out how to access (and save) the logo resource --> + <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"--> + <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div> + <div style="margin: 0px 10px 8px 10px" class="pagetitle">bind</div> + + <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;"> + <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=66798"> + <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a> + <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=66798">Edit Page</a> + + <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW"> + <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif" + height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a> + <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a> + + <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=66798"> + <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Add Page"></a> + <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=66798">Add Page</a> + + <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=66798"> + <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Add News"></a> + <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=66798">Add News</a> + </div> + </div> + + <div class="pagecontent"> + <div class="wiki-content"> + <div id="ConfluenceContent"> +<div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> +<p>To use this tag:</p> +<ul><li>Add: <em><%@ taglib prefix="sx" uri="/struts-dojo-tags" %></em> to your page.</li><li>The <a shape="rect" href="dojo-head.html">head</a> tag must be included on the page, which can be configured for performance or debugging purposes.</li><li>If the parseContent parameter for the <a shape="rect" href="dojo-head.html">head</a> tag is false (it is false by default), then the <strong>id</strong> tag is required.</li></ul> +</div></div> +<div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Additional Examples</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> +<p>For more examples see <a shape="rect" href="ajax-and-javascript-recipes.html">Ajax and JavaScript Recipes</a></p></div></div> + +<h2 id="bind-Description">Description</h2> +<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> + +<p>There's a bug in IE6/IE7 which makes impossible to use the target's attribute with a parent Div, because such Div's content's are overwritten with the tag's <em>loadingText</em>. Resulting in an "undefined" message in the content's, instead of the result of the request.</p> + +<p>One possible alternative is to set <em>showLoadingText="false"</em> and set the indicator attribute to an element showing the desired loading text or image (outside the div).</p> + +<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> +<img id="loadingImage" src="images/loadingAnimation.gif" style="display:none"/> +<s:div id="parentDiv"> + <s:form action="actionName"> + <s:submit id="btn" /> + <sx:bind sources="btn" events="onclick" targets="parentDiv" showLoadingText="false" indicator="loadingImage"/> + </s:form> +</s:div> +</pre> +</div></div> + +<h2 id="bind-Parameters">Parameters</h2> +<p><table width="100%"><tr><td colspan="6" rowspan="1"><h4>Dynamic Attributes Allowed:</h4> false</td></tr><tr><td colspan="6" rowspan="1"> </td></tr><tr><th align="left" colspan="1" rowspan="1" valign="top"><h4>Name</h4></th><th align="left" colspan="1" rowspan="1" valign="top"><h4>Required</h4></th><th align="left" colspan="1" rowspan="1" valign="top"><h4>Default</h4></th><th align="left" colspan="1" rowspan="1" valign="top"><h4>Evaluated</h4></th><th align="left" colspan="1" rowspan="1" valign="top"><h4>Type</h4></th><th align="left" colspan="1" rowspan="1" valign="top"><h4>Description</h4></th></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">afterNotifyTopics</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="t op">Comma delimmited list of topics that will published after the request(if the request succeeds)</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">ajaxAfterValidation</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">Boolean</td><td align="left" colspan="1" rowspan="1" valign="top">Make an asynchronous request if validation succeeds. Only valid is 'validate' is 'true'</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">beforeNotifyTopics</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Comma delim mited list of topics that will published before the request</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">errorNotifyTopics</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Comma delimmited list of topics that will published after the request(if the request fails)</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">errorText</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">The text to display to the user if the is an error fetching the content</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">events</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Comma delimited list of event names to attach to</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">executeScripts</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">Boolean</td><td align="left" colspan="1" rowspan="1" valign="top">Javascript code in the fetched content will be executed</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">formFilter</td><td align="left" co lspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Function name used to filter the fields of the form.</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">formId</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Form id whose fields will be serialized and passed as parameters</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">handler</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td al ign="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Javascript function name that will make the request</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">highlightColor</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">none</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Color used to perform a highlight effect on the elements specified in the 'targets' attribute</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">highlightDuration</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">2000</td><td align="left" colspan="1" rowspan="1" valign="top">false</t d><td align="left" colspan="1" rowspan="1" valign="top">Integer</td><td align="left" colspan="1" rowspan="1" valign="top">Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">href</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">id</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspa n="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">The id to use for the element</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">indicator</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Id of element that will be shown while making request</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">listenTopics</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Topic that will trigger the remote call< /td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">loadingText</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">Loading...</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Text to be shown while content is being fetched</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">notifyTopics</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Comma delimmited list of topics that will published before and after the request, and on errors</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="to p">separateScripts</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">true</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Run scripts in a separate scope, unique for each tag</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">showErrorTransportText</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">true</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">Boolean</td><td align="left" colspan="1" rowspan="1" valign="top">Set whether errors will be shown or not</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">showLoadingText</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left " colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">Boolean</td><td align="left" colspan="1" rowspan="1" valign="top">Show loading text on targets</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">sources</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Comma delimited list of ids of the elements to attach to</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">targets</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top"></td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1 " rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Comma delimited list of ids of the elements whose content will be updated</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">transport</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">XMLHTTPTransport</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">String</td><td align="left" colspan="1" rowspan="1" valign="top">Transport used by Dojo to make the request</td></tr><tr><td align="left" colspan="1" rowspan="1" valign="top">validate</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">false</td><td align="left" colspan="1" rowspan="1" valign="top">Boolean</td><td align="left" colspan="1" rowspan="1" valign ="top">Perform Ajax validation. 'ajaxValidation' interceptor must be applied to action</td></tr></table></p> + +<h2 id="bind-Examples">Examples</h2> +<p>Without attaching to an event, listening to a topic (used to make an Ajax call):</p> +<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> +<p>Attached to event 'onclick' on submit button:</p> +<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> +<p>Submit form:</p> +<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> +<p>Using beforeNotifyTopics:</p> +<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> +<p>Using afterNotifyTopics and highlight:</p> +<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div> +<p>Using errorNotifyTopics and indicator:</p> +<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div> + </div> + + + </div> +</div> +<div class="footer"> + Generated by CXF SiteExporter +</div> +</body> +</html>
http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/bootstrap.html ---------------------------------------------------------------------- diff --git a/content/docs/bootstrap.html b/content/docs/bootstrap.html new file mode 100644 index 0000000..5e47883 --- /dev/null +++ b/content/docs/bootstrap.html @@ -0,0 +1,181 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html> +<head> + <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css"> + <style type="text/css"> + .dp-highlighter { + width:95% !important; + } + </style> + <style type="text/css"> + .footer { + background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif'); + background-repeat: repeat-x; + background-position: left top; + padding-top: 4px; + color: #666; + } + </style> + <script type="text/javascript" language="javascript"> + var hide = null; + var show = null; + var children = null; + + function init() { + /* Search form initialization */ + var form = document.forms['search']; + if (form != null) { + form.elements['domains'].value = location.hostname; + form.elements['sitesearch'].value = location.hostname; + } + + /* Children initialization */ + hide = document.getElementById('hide'); + show = document.getElementById('show'); + children = document.all != null ? + document.all['children'] : + document.getElementById('children'); + if (children != null) { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } + } + + function showChildren() { + children.style.display = 'block'; + show.style.display = 'none'; + hide.style.display = 'inline'; + } + + function hideChildren() { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } + </script> + <title>Bootstrap</title> +</head> +<body onload="init()"> +<table border="0" cellpadding="2" cellspacing="0" width="100%"> + <tr class="topBar"> + <td align="left" valign="middle" class="topBarDiv" align="left" nowrap> + <a href="home.html">Home</a> > <a href="tutorials.html">Tutorials</a> > <a href="bootstrap.html">Bootstrap</a> + </td> + <td align="right" valign="middle" nowrap> + <form name="search" action="https://www.google.com/search" method="get"> + <input type="hidden" name="ie" value="UTF-8" /> + <input type="hidden" name="oe" value="UTF-8" /> + <input type="hidden" name="domains" value="" /> + <input type="hidden" name="sitesearch" value="" /> + <input type="text" name="q" maxlength="255" value="" /> + <input type="submit" name="btnG" value="Google Search" /> + </form> + </td> + </tr> +</table> + +<div id="PageContent"> + <div class="pageheader" style="padding: 6px 0px 0px 0px;"> + <!-- We'll enable this once we figure out how to access (and save) the logo resource --> + <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"--> + <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div> + <div style="margin: 0px 10px 8px 10px" class="pagetitle">Bootstrap</div> + + <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;"> + <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=13874"> + <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a> + <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=13874">Edit Page</a> + + <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW"> + <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif" + height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a> + <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a> + + <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=13874"> + <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Add Page"></a> + <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=13874">Add Page</a> + + <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=13874"> + <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Add News"></a> + <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=13874">Add News</a> + </div> + </div> + + <div class="pagecontent"> + <div class="wiki-content"> + <div id="ConfluenceContent"><p>The Bootstap tutorials starts from the very beginning and steps through creating a simple application. </p> + +<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="ready-set-go.html">Ready, Set, Go!</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> We download the framework and get started on an application of our own. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="hello-world.html">Hello World</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> We present a page with a simple Welcome message. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="using-tags.html">Using Tags</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> We create a Welcome page with links to other actions in the application. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="coding-actions.html">Coding Actions</a> </p></td><td colspan="1" rowspan=" 1" class="confluenceTd"><p> We interpret the Logon form, and return a different result code depending on the circumstances. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="selecting-results.html">Selecting Results</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> We setup different results for different result codes. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="validating-input.html">Validating Input</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> We use the validation framework to verify data submitted from a form.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rect" href="localizing-output.html">Localizing Output</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> We move the validation messages to a message resource bundle. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <a shape="rec t" href="flying-solo.html">Flying Solo</a> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> And, now, you're on your own, but not alone ... </p></td></tr></tbody></table></div> + + +<p><img class="emoticon emoticon-light-on" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/lightbulb_on.png" data-emoticon-name="light-on" alt="(lightbulb)"> For more coding examples, see the <a shape="rect" href="cookbook.html">Cookbook</a>.</p> + +<h2 id="Bootstrap-Next:">Next: <a shape="rect" href="ready-set-go.html">Ready, Set, Go!</a></h2></div> + </div> + + <div class="tabletitle"> + Children + <span class="smalltext" id="show" style="display: inline;"> + <a href="javascript:showChildren()">Show Children</a></span> + <span class="smalltext" id="hide" style="display: none;"> + <a href="javascript:hideChildren()">Hide Children</a></span> + </div> + <div class="greybox" id="children" style="display: none;"> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + $page.link($child) + <span class="smalltext">(Apache Struts 2 Documentation)</span> + <br> + </div> + + </div> +</div> +<div class="footer"> + Generated by CXF SiteExporter +</div> +</body> +</html> http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/building-struts-2-fast-track-release.html ---------------------------------------------------------------------- diff --git a/content/docs/building-struts-2-fast-track-release.html b/content/docs/building-struts-2-fast-track-release.html new file mode 100644 index 0000000..380c30f --- /dev/null +++ b/content/docs/building-struts-2-fast-track-release.html @@ -0,0 +1,262 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html> +<head> + <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css"> + <style type="text/css"> + .dp-highlighter { + width:95% !important; + } + </style> + <style type="text/css"> + .footer { + background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif'); + background-repeat: repeat-x; + background-position: left top; + padding-top: 4px; + color: #666; + } + </style> + <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' /> + <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' /> + <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushCss.js' type='text/javascript'></script> + <script type="text/javascript"> + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); + </script> + <script type="text/javascript" language="javascript"> + var hide = null; + var show = null; + var children = null; + + function init() { + /* Search form initialization */ + var form = document.forms['search']; + if (form != null) { + form.elements['domains'].value = location.hostname; + form.elements['sitesearch'].value = location.hostname; + } + + /* Children initialization */ + hide = document.getElementById('hide'); + show = document.getElementById('show'); + children = document.all != null ? + document.all['children'] : + document.getElementById('children'); + if (children != null) { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } + } + + function showChildren() { + children.style.display = 'block'; + show.style.display = 'none'; + hide.style.display = 'inline'; + } + + function hideChildren() { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } + </script> + <title>Building Struts 2 - Fast track release</title> +</head> +<body onload="init()"> +<table border="0" cellpadding="2" cellspacing="0" width="100%"> + <tr class="topBar"> + <td align="left" valign="middle" class="topBarDiv" align="left" nowrap> + <a href="home.html">Home</a> > <a href="guides.html">Guides</a> > <a href="contributors-guide.html">Contributors Guide</a> > <a href="creating-and-signing-a-distribution.html">Creating and Signing a Distribution</a> > <a href="building-struts-2-fast-track-release.html">Building Struts 2 - Fast track release</a> + </td> + <td align="right" valign="middle" nowrap> + <form name="search" action="https://www.google.com/search" method="get"> + <input type="hidden" name="ie" value="UTF-8" /> + <input type="hidden" name="oe" value="UTF-8" /> + <input type="hidden" name="domains" value="" /> + <input type="hidden" name="sitesearch" value="" /> + <input type="text" name="q" maxlength="255" value="" /> + <input type="submit" name="btnG" value="Google Search" /> + </form> + </td> + </tr> +</table> + +<div id="PageContent"> + <div class="pageheader" style="padding: 6px 0px 0px 0px;"> + <!-- We'll enable this once we figure out how to access (and save) the logo resource --> + <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"--> + <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div> + <div style="margin: 0px 10px 8px 10px" class="pagetitle">Building Struts 2 - Fast track release</div> + + <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;"> + <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27834014"> + <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a> + <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27834014">Edit Page</a> + + <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW"> + <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif" + height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a> + <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a> + + <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=27834014"> + <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Add Page"></a> + <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=27834014">Add Page</a> + + <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27834014"> + <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Add News"></a> + <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27834014">Add News</a> + </div> + </div> + + <div class="pagecontent"> + <div class="wiki-content"> + <div id="ConfluenceContent"><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This version is outdated! Work-in-progress!</p></div></div><h1 id="BuildingStruts2-Fasttrackrelease-Content">Content</h1><p><style type="text/css">/*<![CDATA[*/ +div.rbtoc1488974264189 {padding: 0px;} +div.rbtoc1488974264189 ul {list-style: none;margin-left: 0px;} +div.rbtoc1488974264189 li {margin-left: 0px;padding-left: 0px;} + +/*]]>*/</style></p><div class="toc-macro rbtoc1488974264189"> +<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-BuildingSteps(Struts)">Building Steps (Struts)</a> +<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Gettingready">Getting ready</a></li><li><span class="TOCOutline">1.2</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Updateversionofarchetypes">Update version of archetypes</a></li><li><span class="TOCOutline">1.3</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Applysecuritypatch">Apply security patch</a></li><li><span class="TOCOutline">1.4</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Preparerelease">Prepare release</a></li><li><span class="TOCOutline">1.5</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Performtherelease">Perform the release</a></li><li><span class="TOCOutline">1.6</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Movetheassembliestothe/www/people.apache.org/builds/struts/$VERSIONdir">Move the assemblies to the /www/people.apache.org/builds/struts/$VERSION dir</a></li> <li><span class="TOCOutline">1.7</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Jirastuff">Jira stuff</a></li><li><span class="TOCOutline">1.8</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Voteonit">Vote on it</a></li><li><span class="TOCOutline">1.9</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Copyfiles">Copy files</a></li><li><span class="TOCOutline">1.10</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Promoterelease">Promote release</a></li><li><span class="TOCOutline">1.11</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Cleanupoldreleases">Clean up old releases</a></li><li><span class="TOCOutline">1.12</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Waitforrsync">Wait for rsync</a></li><li><span class="TOCOutline">1.13</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-(Optional)-UpdateSecurityBulletins">(Optional) - Update Security Bulletins</a></li><li><span class="TOCOu tline">1.14</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Updatesite(Strutstoplevelsite)">Update site (Struts top level site)</a></li><li><span class="TOCOutline">1.15</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Updatesite(Struts2site)">Update site (Struts 2 site)</a></li><li><span class="TOCOutline">1.16</span> <a shape="rect" href="#BuildingStruts2-Fasttrackrelease-Postannouncements">Post announcements</a></li></ul> +</li></ul> +</div><h2 id="BuildingStruts2-Fasttrackrelease-BuildingSteps(Struts)">Building Steps (Struts)</h2><h3 id="BuildingStruts2-Fasttrackrelease-Gettingready">Getting ready</h3><ol><li>Prepare new Security Bulletin - use just brief description about the security vulnerability, no examples, no proof-of-concept, anything that could be used against users, secure the page to allow access only member of struts-committers group in Confluence</li><li>Create a new Version Notes page in Confluence, link from <a shape="rect" href="migration-guide.html">Migration Guide</a>, and link to prior release page and JIRA DONE filters of the version to release, secure the page to allow access only member of struts-committers group in Confluence</li><li><p>When a serious security issue arises, we should try to create a <code>STRUTS_#_#_#_X</code> branch from the last GA release (from tag - check it out and use <code>mvn release:branch</code> as below).</p><div class="preformatted panel" style="border-width: 1 px;"><div class="preformattedContent panelContent"> +<pre>svn co https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_#_#_# + +cd STRUTS_#_#_# + +mvn release:branch -DbranchName=STRUTS_#_#_#_X -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true +</pre> +</div></div><p>Read the <a shape="rect" class="external-link" href="http://maven.apache.org/maven-release/maven-release-plugin/examples/branch.html">maven release:branch</a> docs for further details or alternatively</p></li><li>Apply to that branch only the security patch</li><li>Commit the fix. No reference should be make to the commit being related to a security vulnerability.</li><li>If the patch first applies to some other dependency, implore the other group to do the same, to avoid side-effects from other changes.</li><li>Release the upcoming version in JIRA (under Administration/Manage Releases) and tag the release date</li><li>Create DONE and TODO filters for the new version, share with all, and remove obsolete TODO filter</li></ol><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Changing version in poms</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence- information-macro-body"><p>If needed, you can use <a shape="rect" class="external-link" href="http://mojo.codehaus.org/versions-maven-plugin/" rel="nofollow">Versions Maven Plugin</a> to set <span>-SNAPSHOT</span><span style="line-height: 1.4285715;"> version in all poms, like below:</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mvn versions:set -DnewVersion=2.3.16.1-SNAPSHOT -DgenerateBackupPoms=false</pre> +</div></div></div></div><h3 id="BuildingStruts2-Fasttrackrelease-Updateversionofarchetypes"><span style="line-height: 1.5625;">Update version of archetypes</span></h3><p>Edit <code>src/site/resources/archetype-catalog.xml</code> and change version of archetypes to current $VERSION, save and commit.</p><h3 id="BuildingStruts2-Fasttrackrelease-Applysecuritypatch">Apply security patch</h3><p>Apply and commit security patch.</p><h3 id="BuildingStruts2-Fasttrackrelease-Preparerelease">Prepare release</h3><p>Tag the release by using the {{release:prepare}} goal of Maven:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mvn release:prepare -DautoVersionSubmodules=true +</pre> +</div></div><p>For a <a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/usage.html">dry run</a>, add '-DdryRun=true'. If you do a dry run, use 'mvn release:clean' to clean up after you have looked at the output.</p><p>When prompted for the SCM tag name, follow this pattern: STRUTS_2_3_[PATCH_VERSION]</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you get the error message above, try to re-run mvn release:prepare -DautoVersionSubmodules=true command again, -Dresume flag is set to true by default and the plugin will resume the release process from where it failed before.</p></div></div><p>This step will (<a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html">more information</a>):</p><u l><li>Check that there are no uncommitted changes in the sources</li><li>Check that there are no SNAPSHOT dependencies</li><li>Change the version in the poms from x-SNAPSHOT to a new version (you will be prompted for the versions to use)</li><li>Transform the SCM information in the POM to include the final destination of the tag</li><li>Run the project tests against the modified POMs to confirm everything is in working order</li><li>Commit the modified POMs</li><li>Tag the code in the SCM with a version name (this will be prompted for)</li><li>Bump the version in the POMs to a new value y-SNAPSHOT (these values will also be prompted for)</li><li>Commit the modified POMs</li></ul><h3 id="BuildingStruts2-Fasttrackrelease-Performtherelease">Perform the release</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mvn release:perform -Dusername=yourSvnUsername +</pre> +</div></div><p>This step will (<a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/examples/perform-release.html">more information</a>):</p><ul><li>Checkout from an SCM URL with optional tag</li><li>Run the predefined Maven goals to release the project (by default, deploy site-deploy)</li></ul><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>N.B.: this step takes a long time (about 2 hours with a broadband connection)</p></div></div><p>After this step the artifacts will be hosted by <a shape="rect" class="external-link" href="http://repository.apache.org/">Nexus </a></p><p>If you need to run perform again, (or in a different box), do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git clone https://git-wip-us.apache.org/repos/asf/struts.git +git checkout $VERSION +cd $VERSION +mvn deploy --no-plugin-updates -DperformRelease=true +</pre> +</div></div><p>Next, log in to <a shape="rect" class="external-link" href="http://repository.apache.org/">Nexus </a> and <strong>close</strong> staging repository.</p><h3 id="BuildingStruts2-Fasttrackrelease-Movetheassembliestothe/www/people.apache.org/builds/struts/$VERSIONdir">Move the assemblies to the /www/people.apache.org/builds/struts/$VERSION dir</h3><p>After closing repository in Nexus, check if the version is available from staging repository as below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION/ +</pre> +</div></div><p>In order to move the assemblies login to people.apache.org and execute the following code:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: plain; gutter: false; theme: Default" style="font-size:12px;">#!/bin/sh +# create the destination directory +mkdir $VERSION +cd $VERSION + +# get the distro +wget -erobots=off -nv -l 1 --accept=zip,md5,sha1,asc -r --no-check-certificate -nd -nH https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION + +# rename files +for f in *2-assembly*.zip* +do + mv $f `echo $f | sed s/2-assembly//g` +done + +# remove unneeded files +for f in struts2-assembly-*.pom* +do + rm $f +done + +# remove unneeded hashes +rm *.asc.md5 +rm *.asc.sha1 +</pre> +</div></div><p>After that move the assemblies directory to the builds destination with</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mv $VERSION /www/people.apache.org/builds/struts/ +</pre> +</div></div><h3 id="BuildingStruts2-Fasttrackrelease-Jirastuff">Jira stuff</h3><ul><li>Update JIRA roadmap with tag/release date - release the version in JIRA</li><li>Add next milestone to the JIRA roadmap</li><li>Create DONE and TODO filters, share with all, and remove obsolete TODO filter</li><li>Create new release page, link from <a shape="rect" href="migration-guide.html">Migration Guide</a>, and link to prior release page and JIRA filters</li></ul><h3 id="BuildingStruts2-Fasttrackrelease-Voteonit">Vote on it</h3><p>Post a release/quality vote to the dev list (and <strong>only</strong> the dev list). The example mail is on <a shape="rect" href="sample-announcements.html">Sample announcements</a> page. Include the term "fast-track" in the subject, as: [VOTE] Struts 2.0.9.1 quality (fast track).</p><h3 id="BuildingStruts2-Fasttrackrelease-Copyfiles">Copy files</h3><p>After the vote, if the distribution is being mirrored (there was a favourable release vote) copy the Sources and Bi naries:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">ssh people.apache.org +cd /www/people.apache.org/builds/struts/$VERSION +cp struts-$VERSION-src.* /www/www.apache.org/dist/struts/source +cp struts-$VERSION-docs.* /www/www.apache.org/dist/struts/documentation +cp struts-$VERSION-lib.* /www/www.apache.org/dist/struts/library +cp struts-$VERSION-apps.* /www/www.apache.org/dist/struts/examples +cp struts-$VERSION-all.* /www/www.apache.org/dist/struts/binaries +</pre> +</div></div><p>If a new DTD was defined, copy it to /www/struts.apache.org/dtds/ and change permission to struts group (chown :struts *.dtd) and write rights (chmod g+w *.dtd).</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The default setup on people.apache.org will leave the files and directories only changeable by the user who creates them. The last two steps will allow future releases to go smoothly.</p></div></div><h3 id="BuildingStruts2-Fasttrackrelease-Promoterelease">Promote release</h3><p>Log in again to <a shape="rect" class="external-link" href="http://repository.apache.org/">Nexus</a> and <strong>release</strong> the repository, it will be automatically replicated across Maven Repositories<br clear="none"> See <a shape="rect" class="external-link" href="http://maven.apache.org/developers/rele ase/apache-release.html">Releasing a Maven-based project</a> for further details.</p><h3 id="BuildingStruts2-Fasttrackrelease-Cleanupoldreleases">Clean up old releases</h3><p>Remove the old files from under /www/www.apache.org/dist/struts/ to synchronize only the latest version with peers. All the files from /www/www.apache.org/dist/ are always mirrored to <a shape="rect" class="external-link" href="http://archive.apache.org/dist/struts/">http://archive.apache.org/dist/struts/</a></p><h3 id="BuildingStruts2-Fasttrackrelease-Waitforrsync">Wait for rsync</h3><p>Wait 24 hours before proceeding.</p><h3 id="BuildingStruts2-Fasttrackrelease-(Optional)-UpdateSecurityBulletins">(Optional) - Update Security Bulletins</h3><p>If the release will fix a - hopefully yet undisclosed - security issue, it's now time to update the <a shape="rect" href="security-bulletins.html">Security Bulletins</a> page and add a new announcement. For a template, just check former announcements</p><h3 id="BuildingSt ruts2-Fasttrackrelease-Updatesite(Strutstoplevelsite)">Update site (Struts top level site)</h3><ul><li><p>Check out site src code</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">svn co https://svn.apache.org/repos/asf/struts/site/ struts-site +</pre> +</div></div></li><li>Update xml files<ul><li>struts-site/src/site/xdoc/announce.xml (if applicable, refer also to corresponding security bulletin)</li><li>struts-site/src/site/xdoc/downloads.xml (remove previous version)</li><li>struts-site/src/site/xdoc/download.xml (remove previous version)</li><li>struts-site/src/site/xdoc/index.xml</li><li>struts-site/src/site/site.xml</li><li>struts-site/src/site/resources/archetype-catalog.xml</li></ul></li><li>Commit the changes</li><li>Got to <a shape="rect" class="external-link" href="http://struts.staging.apache.org">Struts Staging</a> and review the changes</li><li>If everything is ok, push changes to Production via Apache CMS web interface</li></ul><h3 id="BuildingStruts2-Fasttrackrelease-Updatesite(Struts2site)">Update site (Struts 2 site)</h3><p>Use below script to perform update</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">#!/bin/sh +# script used to update struts2-subsite after release + +VERSION=2.3.15 +BRANCH=2.3.x +TAG=STRUTS_2_3_15 + +svn co https://svn.apache.org/repos/infra/websites/production/struts/content/ struts-site +svn co https://svn.apache.org/repos/asf/struts/struts2/tags/$TAG/ $TAG + +wget -erobots=off http://people.apache.org/builds/struts/$VERSION/struts-$VERSION-docs.zip + +unzip struts-$VERSION-docs.zip -d docs +rm -r struts-site/release/$BRANCH/docs +rm -r struts-site/release/$BRANCH/struts2-core +rm -r struts-site/release/$BRANCH/struts2-plugins +rm -r struts-site/release/$BRANCH/xwork-core + +mv -f docs/struts-$VERSION/docs/* struts-site/release/$BRANCH + +cd $TAG +mvn site:site site:stage -DstagingDirectory=../struts-site/release/$BRANCH + +cd ../struts-site + +svn add --force ./ +# Delete removed files +svn st | grep '^!' | awk '{print $2}' | xargs svn delete --force +svn commit -m "Updates Struts2 subsite after release process" + +cd .. +rm -r struts-site +rm -r $TAG +rm -r docs +rm struts-$VERSION-docs.zip +</pre> +</div></div><h3 id="BuildingStruts2-Fasttrackrelease-Postannouncements">Post announcements</h3><p>We leave this as the last step, once the artifacts have had time to sync up on the mirrors. <br clear="none"> Announce the release and the vulnerability. Typically this will be sent to the reporter, the project's users list (user@struts.a.o), the project's dev list (dev@struts.a.o), the project's announce list (announcements@struts.a.o), secur...@apache.org, full-disclos...@lists.grok.org.uk and bugt...@securityfocus.com.<br clear="none"> Samples are available at <a shape="rect" href="sample-announcements.html">Sample announcements</a> page.</p></div> + </div> + + + </div> +</div> +<div class="footer"> + Generated by CXF SiteExporter +</div> +</body> +</html> http://git-wip-us.apache.org/repos/asf/struts-site/blob/124e36c4/content/docs/building-struts-2-normal-release.html ---------------------------------------------------------------------- diff --git a/content/docs/building-struts-2-normal-release.html b/content/docs/building-struts-2-normal-release.html new file mode 100644 index 0000000..8737ebd --- /dev/null +++ b/content/docs/building-struts-2-normal-release.html @@ -0,0 +1,246 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html> +<head> + <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css"> + <style type="text/css"> + .dp-highlighter { + width:95% !important; + } + </style> + <style type="text/css"> + .footer { + background-image: url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif'); + background-repeat: repeat-x; + background-position: left top; + padding-top: 4px; + color: #666; + } + </style> + <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' /> + <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' /> + <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script> + <script src='https://struts.apache.org/highlighter/js/shBrushCss.js' type='text/javascript'></script> + <script type="text/javascript"> + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); + </script> + <script type="text/javascript" language="javascript"> + var hide = null; + var show = null; + var children = null; + + function init() { + /* Search form initialization */ + var form = document.forms['search']; + if (form != null) { + form.elements['domains'].value = location.hostname; + form.elements['sitesearch'].value = location.hostname; + } + + /* Children initialization */ + hide = document.getElementById('hide'); + show = document.getElementById('show'); + children = document.all != null ? + document.all['children'] : + document.getElementById('children'); + if (children != null) { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } + } + + function showChildren() { + children.style.display = 'block'; + show.style.display = 'none'; + hide.style.display = 'inline'; + } + + function hideChildren() { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } + </script> + <title>Building Struts 2 - Normal release</title> +</head> +<body onload="init()"> +<table border="0" cellpadding="2" cellspacing="0" width="100%"> + <tr class="topBar"> + <td align="left" valign="middle" class="topBarDiv" align="left" nowrap> + <a href="home.html">Home</a> > <a href="guides.html">Guides</a> > <a href="contributors-guide.html">Contributors Guide</a> > <a href="creating-and-signing-a-distribution.html">Creating and Signing a Distribution</a> > <a href="building-struts-2-normal-release.html">Building Struts 2 - Normal release</a> + </td> + <td align="right" valign="middle" nowrap> + <form name="search" action="https://www.google.com/search" method="get"> + <input type="hidden" name="ie" value="UTF-8" /> + <input type="hidden" name="oe" value="UTF-8" /> + <input type="hidden" name="domains" value="" /> + <input type="hidden" name="sitesearch" value="" /> + <input type="text" name="q" maxlength="255" value="" /> + <input type="submit" name="btnG" value="Google Search" /> + </form> + </td> + </tr> +</table> + +<div id="PageContent"> + <div class="pageheader" style="padding: 6px 0px 0px 0px;"> + <!-- We'll enable this once we figure out how to access (and save) the logo resource --> + <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"--> + <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div> + <div style="margin: 0px 10px 8px 10px" class="pagetitle">Building Struts 2 - Normal release</div> + + <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;"> + <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27832970"> + <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a> + <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27832970">Edit Page</a> + + <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW"> + <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif" + height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a> + <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a> + + <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=27832970"> + <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Add Page"></a> + <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=27832970">Add Page</a> + + <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27832970"> + <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif" + height="16" width="16" border="0" align="absmiddle" title="Add News"></a> + <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27832970">Add News</a> + </div> + </div> + + <div class="pagecontent"> + <div class="wiki-content"> + <div id="ConfluenceContent"><h1 id="BuildingStruts2-Normalrelease-Content">Content</h1><p><style type="text/css">/*<![CDATA[*/ +div.rbtoc1488974256435 {padding: 0px;} +div.rbtoc1488974256435 ul {list-style: none;margin-left: 0px;} +div.rbtoc1488974256435 li {margin-left: 0px;padding-left: 0px;} + +/*]]>*/</style></p><div class="toc-macro rbtoc1488974256435"> +<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Gettingready">Getting ready</a></li><li><span class="TOCOutline">2</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-UpdateDraftDocswhenneeded">Update Draft Docs when needed</a></li><li><span class="TOCOutline">3</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Besureyourlocalcopyisup-to-date">Be sure your local copy is up-to-date</a></li><li><span class="TOCOutline">4</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Preparerelease">Prepare release</a></li><li><span class="TOCOutline">5</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Performtherelease">Perform the release</a></li><li><span class="TOCOutline">6</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Movetheassemblies">Move the assemblies</a></li><li><span class="TOCOutline">7</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Announceavailabili ty">Announce availability</a></li><li><span class="TOCOutline">8</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Pushchanges">Push changes</a></li><li><span class="TOCOutline">9</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Voteonit">Vote on it</a></li><li><span class="TOCOutline">10</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Copyfiles">Copy files</a></li><li><span class="TOCOutline">11</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Promoterelease">Promote release</a></li><li><span class="TOCOutline">12</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Cleanupoldreleases">Clean up old releases</a></li><li><span class="TOCOutline">13</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Waitforrsync">Wait for rsync</a></li><li><span class="TOCOutline">14</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Updatesite">Update site</a></li><li><span class="TOCOutline">15</span> <a shape="rect" href="#Buildin gStruts2-Normalrelease-Redeploythedocs(Optional)">Redeploy the docs (Optional)</a></li><li><span class="TOCOutline">16</span> <a shape="rect" href="#BuildingStruts2-Normalrelease-Postannouncements">Post announcements</a></li></ul> +</div><h2 id="BuildingStruts2-Normalrelease-BuildingSteps(Struts)">Building Steps (Struts)</h2><h3 id="BuildingStruts2-Normalrelease-Gettingready">Getting ready</h3><ol><li>Create an "Struts 2.x.y omnibus ticket" ticket in JIRA to refer to in upcoming release related commit comments and for general documentation purposes. Mark it with priority "Blocker".</li><li>Switch to branch <code>develop</code></li><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 repositories or pluginRepositories listed in the poms.</li><li>If you have committed all changes regarding the release process, close the omnibus ticket as it is the last open ticket for the upcoming release</li><li>Release the upcoming version in JIRA (under Administration/Manage Releases) and tag the release date</li><li>Add next milestone ve rsion 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 shape="rect" href="migration-guide.html">Migration Guide</a>, and link to prior release page and JIRA DONE filters of the version to release</li><li>Export wiki pages and put them under <code>/docs</code></li></ol><h3 id="BuildingStruts2-Normalrelease-UpdateDraftDocswhenneeded">Update Draft Docs when needed</h3><p>Checkout <code>struts-site</code> project (see details at the bottom of this page) and perform export:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">cd struts-site +mvn package</pre> +</div></div><p>If build will fail try again - don't use <code>clean</code>, the exporter is going to update only outdated pages. After successful export, commit updated files into <code>struts-production</code></p><h3 id="BuildingStruts2-Normalrelease-Besureyourlocalcopyisup-to-date">Be sure your local copy is up-to-date</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git fetch origin --prune +git checkout master +git pull</pre> +</div></div><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Please remember to keep BOM subproject in sync - <code><struts-version.version>X.X.X</struts-version.version></code> - 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></div></div><h3 id="BuildingStruts2-Normalrelease-Preparerelease">Prepare release</h3><p>Tag the release by using the "release:prepare" goal of Maven:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mvn release:prepare -DautoVersionSubmodules=true +</pre> +</div></div><p>For a <a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/usage.html">dry run</a>, add <code>-DdryRun=true</code>. If you do a dry run, use <code>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: STRUTS_2_3_[PATCH_VERSION]</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you get an error message, try to re-run <code>mvn release:prepare -DautoVersionSubmodules=true</code> command again, <code>-Dresume</code> flag is set to true by default and the plugin will resume the release process from where it failed before.</p></div></div><p>Follow the link to get <a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/exampl es/prepare-release.html">more information</a> about performed operation by release plugin.</p><h3 id="BuildingStruts2-Normalrelease-Performtherelease">Perform the release</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mvn release:perform -DretryFailedDeploymentCount=10 +</pre> +</div></div><p>Follow the link to get <a shape="rect" class="external-link" href="http://maven.apache.org/plugins/maven-release-plugin/examples/perform-release.html">more information</a> about performed operation by release plugin. <span style="line-height: 1.4285715;">After this step the artifacts will be hosted by </span><a shape="rect" class="external-link" href="http://repository.apache.org/" style="line-height: 1.4285715;">Nexus</a>. The <code>-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="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git checkout STRUTS_2_3_[PATCH_VERSION] +mvn javadoc:javadoc deploy --no-plugin-updates -DperformRelease=true -Papache-release +</pre> +</div></div><p>Next, log in to <a shape="rect" class="external-link" href="http://repository.apache.org/">Nexus </a> and <strong>close</strong> staging repository.</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><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></div></div><h3 id="BuildingStruts2-Normalrelease-Movetheassemblies">Move the assemblies</h3><p>To simplify testing, the assemblies have to be moved to the <code class="java plain">https:</code><code class="java comments">//dist.apache.org/repos/dist/dev/struts/</code><code>$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="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION/ +</pre> +</div></div><p>In order to move the assemblies login to people.apache.org and execute the following code:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">#!/bin/sh + +#create the destination directory +echo "Creating working dir $VERSION" +mkdir $VERSION +cd $VERSION + +# get the distro +echo "Getting distro $VERSION" +wget -erobots=off -nv -l 1 --accept=zip,md5,sha1,asc -r --no-check-certificate -nd -nH https://repository.apache.org/content/groups/staging/org/apache/struts/struts2-assembly/$VERSION + +# rename files +echo "Renaming files" +for f in *2-assembly*.zip* +do + mv $f `echo $f | sed s/2-assembly//g` +done + +# remove unneeded files +echo "Removing unneeded files" +for f in struts2-assembly-*.pom* +do + rm $f +done + +# remove unneeded hashes +echo "Removing unneeded files" +rm *.asc.md5 +rm *.asc.sha1 +cd .. +  +# checking in new version +echo "Pushing test version $VERSION" +svn --no-auth-cache co --depth empty https://dist.apache.org/repos/dist/dev/struts/ struts-dev +mv $VERSION struts-dev/ +cd struts-dev +svn add --force ./ +svn --no-auth-cache commit -m "Updates test release $VERSION" +cd .. + +# cleaning up +rm -r struts-dev + +echo "Done!"</pre> +</div></div><p>After this step artifacts are available for test here <a shape="rect" class="external-link" href="https://dist.apache.org/repos/dist/dev/struts/">https://dist.apache.org/repos/dist/dev/struts/</a></p><h3 id="BuildingStruts2-Normalrelease-Announceavailability"><span style="font-size: 16.0px;line-height: 1.5625;">Announce availability</span></h3><p>Send a short e-mail to dev@struts.a.o 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><h3 id="BuildingStruts2-Normalrelease-Pushchanges">Push changes</h3><p>Do not forget to push your local changes to the Apache repo</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git push</pre> +</div></div><h3 id="BuildingStruts2-Normalrelease-Voteonit">Vote on it</h3><p>Post a release/quality vote to the dev list (and <strong>only</strong> the dev list). The example mail is on <a shape="rect" href="sample-announcements.html">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><h3 id="BuildingStruts2-Normalrelease-Copyfiles">Copy files</h3><p>After the vote, if the distribution is being mirrored (there was a favourable release vote) move all the artefa<span style="line-height: 1.4285715;">cts from <code>dev</code> folder into <code>release</code> folder:</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">svn mv https://dist.apache.org/repos/dist/dev/struts/$VERSION/ https://dist.apache.org/repos/dist/release/struts/ </pre> +</div></div><h3 id="BuildingStruts2-Normalrelease-Promoterelease">Promote release</h3><p>Log in again to <a shape="rect" class="external-link" href="http://repository.apache.org/">Nexus</a> and <strong>release</strong> the repository, it will be automatically replicated across Maven Repositories<br clear="none"> See <a shape="rect" class="external-link" href="http://maven.apache.org/developers/release/apache-release.html">Releasing a Maven-based project</a> for further details.</p><h3 id="BuildingStruts2-Normalrelease-Cleanupoldreleases">Clean up old releases</h3><p>Remove the old files from under <a shape="rect" class="external-link" 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 shape="rect" class="external-link" href="https://dist.apache.org/repos/dist/release/struts/">https://dist.apache.org/repos/dist/release/struts/</a> are always mirrored to <a shape="rect" class="external-link" href="http://archive.apache.org/dist/struts/">http://archive.apache.org/dist/struts/</a>. You can use the below command:</p><div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"> +<pre>svn del https://dist.apache.org/repos/dist/release/struts/2.3.x/ +</pre> +</div></div><p>where <code>x</code> is the previous version to remove (or one more previous to keep current and one version back).</p><h3 id="BuildingStruts2-Normalrelease-Waitforrsync">Wait for rsync</h3><p>Wait 24 hours before proceeding.</p><h3 id="BuildingStruts2-Normalrelease-Updatesite"><span style="line-height: 1.5625;">Update site</span></h3><ul><li><p>Check out site src code</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git clone https://git-wip-us.apache.org/repos/asf/struts-site.git +</pre> +</div></div></li><li>If a new DTD was defined, add it to <code>source/dtds</code></li><li>Update current version and release date in <code>struts-site/_config.yml</code></li><li>Update page source files<ul><li>struts-site/source/announce.md (if applicable, refer also to corresponding security bulletin)</li><li>struts-site/source/downloads.html (Prior Releases section)</li><li>struts-site/source/index.html (some parts will updated automatically with values defined in <code>_config.yml</code>)</li></ul></li><li>Generate site 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 shape="rect" class="external-link" href="https://hub.docker.com/r/theapachestruts/struts-site-jekyll/" rel="nofollow">https://hub.docker.com/r/theapachestruts/struts-site-jekyll/</a></li><li>start <code>docker-machine</code></li><li>now you can use one of the b ash scripts already provided in the <code>struts-site</code>:<ul><li><code>docker-run.sh</code> - used with Bash</li><li><code>docker-run.fish</code> - to use with Fish Shell (via <code>fish docker-run.fish</code>)</li></ul></li><li>now you can check the generated site at http://localhost:4000</li></ul></li><li><p>Commit the changes and the generated content</p></li></ul><p>Now the changes must be deployed to production which is basically a separated Subversion repository, you check it out with command below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">svn co https://svn.apache.org/repos/infra/websites/production/struts/content struts-production</pre> +</div></div><p>It's a good idea to keep that working copy to be used with future releases. Right now copy content of <code>struts-site/content</code> folder to <code>struts-production</code> folder, then commit changes. Next step is to update exported wiki pages. With current approach the pages are kept in <code>struts-production/docs</code>.</p><h3 id="BuildingStruts2-Normalrelease-Redeploythedocs(Optional)"><span style="line-height: 1.5625;">Redeploy the docs (Optional)</span></h3><ul style="list-style-type: square;"><li><p>Checkout source of the website and export Confluence pages</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">svn co https://svn.apache.org/repos/asf/struts/site/trunk struts-site +cd struts-site +mvn package</pre> +</div></div><p>Now the whole Confluence space is exported to <code>target/cwiki/WW/docs/</code></p></li><li><p>Checkout copy of production website (if you didn't that before)</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">svn co https://svn.apache.org/repos/infra/websites/production/struts/content/ struts-production</pre> +</div></div><p>(you can checkout just a subtree, but it's better to checkout the whole repo especially when you want to update also the main web page)</p></li><li><p>Update production</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">cp -r struts-site/target/cwiki/WW/docs/* struts-production/docs/ +cd struts-production +svn commit "Updates production"</pre> +</div></div></li></ul><h3 id="BuildingStruts2-Normalrelease-Postannouncements"><span style="line-height: 1.5625;">Post announcements</span></h3><p>We leave this as the last step, once the artifacts have had time to sync up on the mirrors. Target it to: user@struts.a.o, announcements@struts.a.o and  announce@a.o, samples are available at <a shape="rect" href="sample-announcements.html">Sample announcements</a> page</p></div> + </div> + + + </div> +</div> +<div class="footer"> + Generated by CXF SiteExporter +</div> +</body> +</html>