This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/asf-site by this push: new ee320b7 Updates production by Jenkins ee320b7 is described below commit ee320b7bda882e21136e9e35b8283889ca548dd4 Author: jenkins <bui...@apache.org> AuthorDate: Thu Mar 8 06:45:52 2018 +0000 Updates production by Jenkins --- content/maven-archetypes/index.html | 105 +++++++++------------ .../maven-archetypes/struts2-archetype-blank.html | 51 ++++++++-- 2 files changed, 87 insertions(+), 69 deletions(-) diff --git a/content/maven-archetypes/index.html b/content/maven-archetypes/index.html index 48d70a5..f91596d 100644 --- a/content/maven-archetypes/index.html +++ b/content/maven-archetypes/index.html @@ -173,9 +173,9 @@ <h2 id="quickstart">Quickstart</h2> -<p>A recommended way to start with Struts2 archetypes is to work with the archetype catalog.</p> +<p>A recommended way to start with Struts2 archetypes is to use <code class="highlighter-rouge">archetype:generate</code> goal with <code class="highlighter-rouge">filter</code> parameter.</p> -<div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -DarchetypeCatalog=http://struts.apache.org/ +<div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -Dfilter=org.apache:struts </code></pre> </div> @@ -206,9 +206,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ -DartifactId=myWebApp \ -DarchetypeGroupId=org.apache.struts \ - -DarchetypeArtifactId=struts2-archetype-convention \ - -DarchetypeVersion=<CURRENT_STRUTS_VERSION> \ - -DremoteRepositories=http://struts.apache.org + -DarchetypeArtifactId=struts2-archetype-convention </code></pre> </div> @@ -219,9 +217,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ -DartifactId=myWebApp \ -DarchetypeGroupId=org.apache.struts \ - -DarchetypeArtifactId=struts2-archetype-blank \ - -DarchetypeVersion=<CURRENT_STRUTS_VERSION> \ - -DremoteRepositories=http://struts.apache.org + -DarchetypeArtifactId=struts2-archetype-blank </code></pre> </div> @@ -255,9 +251,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ -DartifactId=myWebApp \ -DarchetypeGroupId=org.apache.struts \ - -DarchetypeArtifactId=struts2-archetype-starter \ - -DarchetypeVersion=<CURRENT_STRUTS_VERSION> \ - -DremoteRepositories=http://struts.apache.org + -DarchetypeArtifactId=struts2-archetype-starter </code></pre> </div> @@ -280,9 +274,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ -DartifactId=myWebApp \ -DarchetypeGroupId=org.apache.struts \ - -DarchetypeArtifactId=struts2-archetype-angularjs \ - -DarchetypeVersion=<CURRENT_STRUTS_VERSION> \ - -DremoteRepositories=http://struts.apache.org + -DarchetypeArtifactId=struts2-archetype-angularjs </code></pre> </div> @@ -310,9 +302,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ -DartifactId=myWebApp \ -DarchetypeGroupId=org.apache.struts \ - -DarchetypeArtifactId=struts2-archetype-portlet \ - -DarchetypeVersion=<CURRENT_STRUTS_VERSION> \ - -DremoteRepositories=http://struts.apache.org + -DarchetypeArtifactId=struts2-archetype-portlet </code></pre> </div> @@ -346,9 +336,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ -DartifactId=myWebApp \ -DarchetypeGroupId=org.apache.struts \ - -DarchetypeArtifactId=struts2-archetype-dbportlet \ - -DarchetypeVersion=<CURRENT_STRUTS_VERSION> \ - -DremoteRepositories=http://struts.apache.org + -DarchetypeArtifactId=struts2-archetype-dbportlet </code></pre> </div> @@ -368,9 +356,7 @@ <div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ -DartifactId=myPlugin \ -DarchetypeGroupId=org.apache.struts \ - -DarchetypeArtifactId=struts2-archetype-plugin \ - -DarchetypeVersion=<CURRENT_STRUTS_VERSION> \ - -DremoteRepositories=http://struts.apache.org + -DarchetypeArtifactId=struts2-archetype-plugin </code></pre> </div> @@ -393,25 +379,48 @@ -DgroupId=tutorial \ -DartifactId=tutorial \ -DarchetypeGroupId=org.apache.struts \ - -DarchetypeArtifactId=struts2-archetype-blank \ - -DarchetypeVersion=<CURRENT_STRUTS_VERSION> - -DremoteRepositories=http://struts.apache.org + -DarchetypeArtifactId=struts2-archetype-blank </code></pre> </div> -<p>where <CURRENT_STRUTS_VERSION> is archetype’s version you want to use, e.g. 2.3.15.1</p> - <h3 id="staging-repository">Staging repository</h3> -<p>If the above command will fail because of missing archetypes in central repository, you can try to use staging repository like below</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ +<p>If the above command will fail because of missing archetypes in central repository, you can try to use staging repository.</p> + +<p>Add staging repository to your settings.xml</p> + +<div class="highlighter-rouge"><pre class="highlight"><code><settings> + <profiles> + <profile> + <id>staging</id> + <repositories> + <repository> + <id>archetype</id> + <url>https://repository.apache.org/content/repositories/snapshots/</url> + <releases> + <enabled>true</enabled> + <checksumPolicy>fail</checksumPolicy> + </releases> + <snapshots> + <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> + </snapshots> + </repository> + </repositories> + </profile> + </profiles> +</settings> </code></pre> </div> -<p>or this</p> +<p>Use <code class="highlighter-rouge">staging</code> profile in the command.</p> -<div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -DarchetypeCatalog=http://struts.apache.org/ +<div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B \ + -DgroupId=tutorial \ + -DartifactId=tutorial \ + -DarchetypeGroupId=org.apache.struts \ + -DarchetypeArtifactId=struts2-archetype-blank \ + -Pstaging </code></pre> </div> @@ -443,18 +452,6 @@ <td>archetypeArtifactId</td> <td>The id of the archetype</td> </tr> - <tr> - <td>archetypeVersion</td> - <td>The version of the archetype</td> - </tr> - <tr> - <td>package</td> - <td>(Optional) The base Java package to use for generated source code. Defaults to archetypeGroupId if not specified.</td> - </tr> - <tr> - <td>remoteRepositories</td> - <td>(Optional) A list of remote repositories that contain the archetype.</td> - </tr> </tbody> </table> @@ -463,7 +460,7 @@ <p>These commands are used from the directory created by the archetype plugin (the project’s sub-directory that was created in the previous step).</p> <ul> - <li>To build</li> + <li>To install</li> </ul> <div class="highlighter-rouge"><pre class="highlight"><code> mvn install @@ -471,22 +468,6 @@ </div> <ul> - <li>To create IntelliJ IDEA project files</li> -</ul> - -<div class="highlighter-rouge"><pre class="highlight"><code> mvn idea:idea -</code></pre> -</div> - -<ul> - <li>To create Eclipse project files</li> -</ul> - -<div class="highlighter-rouge"><pre class="highlight"><code> mvn eclipse:eclipse -Dwtpversion=1.5 -</code></pre> -</div> - -<ul> <li>To run test cases</li> </ul> diff --git a/content/maven-archetypes/struts2-archetype-blank.html b/content/maven-archetypes/struts2-archetype-blank.html index 41d0d25..2e86262 100644 --- a/content/maven-archetypes/struts2-archetype-blank.html +++ b/content/maven-archetypes/struts2-archetype-blank.html @@ -199,20 +199,47 @@ pom.xml src/ </code></pre> </div> -<p>Depending on the state of your local system you may see Maven downloading various libraries (known as “downloading the internet”, which is what it seems Maven does sometimes). Be patient – Maven is basically setting up your required libraries automatically. -<strong><version></strong> - is the version of Struts 2 you want to use and archetype was released for, e.g. 2.1.8.1 .</p> +<p>Depending on the state of your local system you may see Maven downloading various libraries (known as “downloading the internet”, which is what it seems Maven does sometimes). Be patient – Maven is basically setting up your required libraries automatically.</p> <h3 id="staging-repository">Staging repository</h3> -<p>If the above command will fail because of missing archetypes in central repository, you can try to use staging repository like below</p> +<p>If the above command will fail because of missing archetypes in central repository, you can try to use staging repository.</p> + +<p>Add staging repository to your settings.xml</p> + +<div class="highlighter-rouge"><pre class="highlight"><code><settings> + <profiles> + <profile> + <id>staging</id> + <repositories> + <repository> + <id>archetype</id> + <url>https://repository.apache.org/content/repositories/snapshots/</url> + <releases> + <enabled>true</enabled> + <checksumPolicy>fail</checksumPolicy> + </releases> + <snapshots> + <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> + </snapshots> + </repository> + </repositories> + </profile> + </profiles> +</settings> +</code></pre> +</div> + +<p>Use <code class="highlighter-rouge">staging</code> profile in the command.</p> <div class="highlighter-rouge"><pre class="highlight"><code>mvn archetype:generate -B \ -DgroupId=tutorial \ -DartifactId=tutorial \ -DarchetypeGroupId=org.apache.struts \ -DarchetypeArtifactId=struts2-archetype-blank \ - -DarchetypeVersion=<version> - -DarchetypeCatalog=http://people.apache.org/builds/struts/<version>/m2-staging-repository/ + -DarchetypeVersion=<version> \ + -Pstaging </code></pre> </div> @@ -356,11 +383,13 @@ pom.xml src/ <h3 id="compilation">Compilation</h3> +<p>Running</p> + <div class="highlighter-rouge"><pre class="highlight"><code>$ mvn compile </code></pre> </div> -<p>will create a <code class="highlighter-rouge">target</code> directory containing the compiled classes. By itself this isn’t terribly useful.</p> +<p>will create a <code class="highlighter-rouge">target</code> directory containing the compiled classes. By itself this isn’t terribly useful.</p> <h3 id="testing">Testing</h3> @@ -376,9 +405,17 @@ pom.xml src/ <h3 id="assembling-creating-a-war">Assembling (Creating a WAR)</h3> +<p>Running</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>$ mvn package +</code></pre> +</div> + +<p>will create a WAR file in the <code class="highlighter-rouge">target</code> directory.</p> + <h3 id="running">Running</h3> -<p>We can run blank-archetype using the <a href="http://www.mortbay.org/jetty/">Jetty</a> server via the <a href="http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin">Maven Jetty Plugin</a> by executing the Jetty plugin’s <code class="highlighter-rouge">run</code> command:</p> +<p>We can run blank-archetype using the <a href="https://www.eclipse.org/jetty/">Jetty</a> server via the <a href="https://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html">Maven Jetty Plugin</a> by executing the Jetty plugin’s <code class="highlighter-rouge">run</code> command:</p> <div class="highlighter-rouge"><pre class="highlight"><code>$ mvn jetty:run </code></pre> -- To stop receiving notification emails like this one, please contact git-site-r...@apache.org.