You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by bu...@apache.org on 2012/12/10 09:17:44 UTC

svn commit: r841370 [27/47] - in /websites/staging/maven/trunk/content: ./ ant/ background/ css/ developers/ developers/conventions/ developers/release/ developers/website/ docs/ docs/2.0.1/ docs/2.0.10/ docs/2.0.11/ docs/2.0.2/ docs/2.0.3/ docs/2.0.4/...

Added: websites/staging/maven/trunk/content/guides/mini/guide-default-execution-ids.html
==============================================================================
--- websites/staging/maven/trunk/content/guides/mini/guide-default-execution-ids.html (added)
+++ websites/staging/maven/trunk/content/guides/mini/guide-default-execution-ids.html Mon Dec 10 08:17:24 2012
@@ -0,0 +1,327 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ | Generated by Apache Maven Doxia at Dec 10, 2012
+ | Rendered using Apache Maven Stylus Skin 1.5
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Maven - Guide to Configuring Default Mojo Executions</title>
+    <style type="text/css" media="all">
+      @import url("../../css/maven-base.css");
+      @import url("../../css/maven-theme.css");
+      @import url("../../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" />
+        <meta name="author" content="John Casey" />
+        <meta name="Date-Revision-yyyymmdd" content="20121210" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                              </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../.././" id="bannerLeft">
+                                                <img src="../../images/apache-maven-project-2.png" alt="" />
+                </a>
+                        <span id="bannerRight">
+                                                <img src="../../images/maven-logo-2.gif" alt="" />
+                </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                   <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../../index.html">Maven</a>
+        &gt;
+        Guide to Configuring Default Mojo Executions
+        </div>
+            <div class="xright">        
+                                    Last Published: 2012-12-10
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                   <h5>Main</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../index.html">Welcome</a>
+            </li>
+          </ul>
+                       <h5>Get Maven</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../download.html">Download</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/3.0.4/release-notes.html">Release Notes (3.0.4)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/2.2.1/release-notes.html">Release Notes (2.2.1)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/2.0.11/release-notes.html">Release Notes (2.0.11)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../license.html">License</a>
+            </li>
+          </ul>
+                       <h5>IDE Integration</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../eclipse-plugin.html">Eclipse</a>
+            </li>
+                  <li class="none">
+                  <a href="../../netbeans-module.html">NetBeans</a>
+            </li>
+          </ul>
+                       <h5>About Maven</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../what-is-maven.html">What is Maven?</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-features.html">Features</a>
+            </li>
+                  <li class="none">
+                  <a href="../../general.html">FAQ (official)</a>
+            </li>
+                  <li class="none">
+                  <a href="http://docs.codehaus.org/display/MAVENUSER/FAQs-1" class="externalLink">FAQ (unofficial)</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Maven Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/index.html">Index (category)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../run-maven/index.html">Running Maven</a>
+            </li>
+                                                                                                                                            <li class="collapsed">
+                  <a href="../../users/index.html">User Centre</a>
+                  </li>
+                                                                                                        <li class="collapsed">
+                  <a href="../../plugin-developers/index.html">Plugin Developer Centre</a>
+                  </li>
+                  <li class="none">
+                  <a href="../../repository/index.html">Maven Repository Centre</a>
+            </li>
+                  <li class="none">
+                  <a href="../../developers/index.html">Maven Developer Centre</a>
+            </li>
+                  <li class="none">
+                  <a href="../../articles.html">Books and Resources</a>
+            </li>
+                  <li class="none">
+                  <a href="http://docs.codehaus.org/display/MAVENUSER/Home" class="externalLink">Wiki</a>
+            </li>
+          </ul>
+                       <h5>Community</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../community.html">Community Overview</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/development/guide-helping.html">How to Contribute</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/mini/guide-maven-evangelism.html">Maven Repository</a>
+            </li>
+                  <li class="none">
+                  <a href="../../users/getting-help.html">Getting Help</a>
+            </li>
+                  <li class="none">
+                  <a href="../../issue-tracking.html">Issue Tracking</a>
+            </li>
+                  <li class="none">
+                  <a href="../../source-repository.html">Source Repository</a>
+            </li>
+                  <li class="none">
+                  <a href="../../team-list.html">The Maven Team</a>
+            </li>
+          </ul>
+                       <h5>Project Documentation</h5>
+                  <ul>
+                                                                                                                          <li class="collapsed">
+                  <a href="../../project-info.html">Project Information</a>
+                  </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="../../doxia/index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../../index.html">Maven 2 & 3</a>
+            </li>
+                  <li class="none">
+                  <a href="../../pom/index.html">Parent POMs</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugin-tools/index.html">Plugin Tools</a>
+            </li>
+                  <li class="none">
+                  <a href="../../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../../skins/index.html">Skins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                       <h5>ASF</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink">How Apache Works</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/" class="externalLink">Foundation</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink">Sponsoring Apache</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/thanks.html" class="externalLink">Thanks</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="../../images/logos/maven-feather.png"/>
+        </a>
+                       
+                               </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section"><h2>Guide to Configuring Default Mojo Executions<a name="Guide_to_Configuring_Default_Mojo_Executions"></a></h2><p>In most cases where you need to configure a plugin, there are two options that work well: plugin-level configuration and execution-level configuration. Plugin-level configuration is the most common method for configuring plugins that will be used from the command line, are defined as part of the default lifecycle, or that use a common configuration across all invocations. In fact, for direct invocation from the command line, plugin-level configuration has been the <i>only</i> option historically.</p><p>On the other hand, in cases where a more advanced build process requires the execution of mojos - sometimes the same mojos, sometimes different ones - from a single plugin that use different configurations, the execution-level configuration is most commonly used. These cases normally involve plugins that are introduced as part of the s
 tandard build process, but which aren't present in the default lifecycle mapping for that particular packaging. In these cases, common settings shared between executions are still normally specified in the plugin-level configuration.</p><p>However, these two options leave out a few important configuration use cases: </p><p># Mojos run from the command line <i>and</i> during the build, when the CLI-driven invocation requires its own configuration.</p><p># Mojo executions that are bound to the lifecycle as part of the default mapping for a particular packaging, especially in cases where the same mojos need to be added to a second execution with different configuration.</p><p># Groups of mojos from the same plugin that are bound to the lifecycle as part of the default mapping for a particular packaging, but require separate configurations.</p><p>Originally, the default value of the executionId - literally set to <tt>default</tt> in the POM model - was meant to provide some of t
 his functionality. Unfortunately, this solution was never tested to make sure it worked with the use cases above; they fell through the cracks during testing. Now, with the release of Maven 2.2.0 (and later, Maven 3.0), these use cases can finally be addressed.</p><div class="section"><h3>Default <tt>executionId</tt>s for Implied Executions<a name="Default_executionIds_for_Implied_Executions"></a></h3><p>When you consider the fact that the aforementioned configuration use cases are for mojos that are not explicitly mentioned in the POM, it's reasonable to refer to them as implied executions. But if they're implied, how can Maven allow users to provide configuration for them? The solution we've implemented is rather simple and low-tech, but should be more than adequate to handle even advanced use cases. Starting in Maven 2.2.0, each mojo invoked directly from the command line will have an execution Id of <tt>default-cli</tt> assigned to it, which will allow the configuration 
 of that execution from the POM by using this default execution Id. Likewise, each mojo bound to the build lifecycle via the default lifecycle mapping for the specified POM packaging will have an execution Id of <tt>default-&lt;goalName&gt;</tt> assigned to it, to allow configuration of each default mojo execution independently.</p><div class="section"><h4>Example: Command-line variant invocation of the assembly plugin<a name="Example:_Command-line_variant_invocation_of_the_assembly_plugin"></a></h4><p>Consider the case where the user wants to execute the <tt>assembly:assembly</tt> mojo directly on the command line, but already has a configuration for the <tt>assembly:single</tt> mojo that runs during the main build lifecycle. Since these configurations require different options, the user cannot use the plugin-level configuration section to specify common elements.</p><p>In this case, the assembly-plugin configuration might look like this:</p><div class="source"><pre>&lt;plug
 in&gt;
+  &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
+  &lt;configuration&gt;
+    &lt;tarLongFileMode&gt;gnu&lt;/tarLongFileMode&gt;    
+  &lt;/configuration&gt;
+  &lt;executions&gt;
+    &lt;execution&gt;
+      &lt;id&gt;build-distros&lt;/id&gt;
+      &lt;phase&gt;package&lt;/phase&gt;
+      &lt;goals&gt;
+        &lt;goal&gt;single&lt;/goal&gt;
+      &lt;/goals&gt;
+      &lt;configuration&gt;
+        &lt;descriptors&gt;
+          &lt;descriptor&gt;src/main/assembly/bin.xml&lt;/descriptor&gt;
+          &lt;descriptor&gt;src/main/assembly/src.xml&lt;/descriptor&gt;
+        &lt;/descriptors&gt;
+      &lt;/configuration&gt;
+    &lt;/execution&gt;
+    &lt;execution&gt;
+      &lt;id&gt;default-cli&lt;/id&gt;
+      &lt;configuration&gt;
+        &lt;descriptorRefs&gt;
+          &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
+          &lt;descriptorRef&gt;project&lt;/descriptorRef&gt;
+        &lt;/descriptorRefs&gt;
+      &lt;/configuration&gt;
+    &lt;/execution&gt;
+  &lt;/executions&gt;
+&lt;/plugin&gt;</pre></div><p>In the above example, you can see several interesting things. First, the main build process will invoke the <tt>assembly:single</tt> mojo during the <tt>package</tt> phase of the build, and produce both binary and source distribution artifacts using custom assembly descriptors included with the project. Second, all invocations of the assembly plugin should use a <tt>tarLongFileMode</tt> strategy of <tt>gnu</tt>. Finally, when the assembly plugin is invoked from the command line, it will build the standard <tt>jar-with-dependencies</tt> and <tt>project</tt> artifacts for the project, and ignore the custom assembly descriptors in <tt>src/main/assembly</tt>.</p><p>Now, notice the difference in the way the two execution blocks reference assembly descriptors. One uses custom descriptors via the <tt>descriptors</tt> section, and the other uses standard descriptors via the <tt>descriptorRefs</tt> section. These two sections cannot override one another,
  so it's impossible to setup one section - say, <tt>descriptorRefs</tt> - in the plugin-level configuration block (to provide CLI access to it, as historical versions of Maven would require), then have the <tt>build-distros</tt> invocation override it with the custom descriptors specified in the <tt>descriptors</tt> section. This configuration is not possible in versions of Maven before 2.2.0.</p></div><div class="section"><h4>Example: Configuring <tt>compile</tt> to run twice<a name="Example:_Configuring_compile_to_run_twice"></a></h4><p>In this scenario, the user wants to run the <tt>compiler:compile</tt> mojo twice for his <tt>jar</tt> packaging project. The main reason for this is to provide an entry point into the application that will warn the user if he's using a Java version older than 1.5, then exit gracefully. Without such an entry point, the user would be confronted with a stacktrace in the event he tried to run this application with a 1.4 or older JRE.</p><p>Ther
 efore, the user needs to compile tha bulk of his application to target the 1.5 Java specification, then compile the rest (the entry point) to target an older specification...say, 1.3. The first execution will specify the <tt>source</tt> and <tt>target</tt> values at <tt>1.5</tt>, and add an <tt>excludes</tt> section to avoid compiling the entry point for the application. The second pass will then re-specify <tt>source</tt> and <tt>target</tt> to <tt>1.3</tt>, and basically invert the original <tt>excludes</tt> section to be an <tt>includes</tt> section, so as to compile <i>only</i> the entry point class.</p><p>The resulting configuration might look something like this:</p><div class="source"><pre>&lt;plugin&gt;
+  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
+  &lt;configuration&gt;
+    &lt;source&gt;1.5&lt;/source&gt;
+    &lt;target&gt;1.5&lt;/target&gt;
+  &lt;/configuration&gt;
+  &lt;executions&gt;
+    &lt;execution&gt;
+      &lt;id&gt;default-compile&lt;/id&gt;
+      &lt;configuration&gt;
+        &lt;excludes&gt;
+          &lt;exclude&gt;**/cli/*&lt;/exclude&gt;
+        &lt;/excludes&gt;
+      &lt;/configuration&gt;
+    &lt;/execution&gt;
+    &lt;execution&gt;
+      &lt;id&gt;build-java14-cli&lt;/id&gt;
+      &lt;phase&gt;compile&lt;/phase&gt;
+      &lt;goals&gt;
+        &lt;goal&gt;compile&lt;/goal&gt;
+      &lt;/goals&gt;
+      &lt;configuration&gt;
+        &lt;source&gt;1.3&lt;/source&gt;
+        &lt;target&gt;1.3&lt;/target&gt;
+        &lt;includes&gt;
+          &lt;include&gt;**/cli/*&lt;/include&gt;
+        &lt;/includes&gt;
+      &lt;/configuration&gt;
+    &lt;/execution&gt;
+  &lt;/executions&gt;
+&lt;/plugin&gt;</pre></div><p>There are three important things to notice in the above compiler-plugin configuration:</p><p># The default <tt>source</tt> and <tt>target</tt> compatibility levels are for Java 1.5. This means that the compiler will generate binaries for Java 1.5 from both the main codebase and the test codebase, unless otherwise overridden.</p><p># The default pass of the <tt>compile</tt> goal will <i>exclude</i> the <tt>**/cli/*</tt> path pattern, but will compile everything else in <tt>src/main/java</tt> to run under Java 1.5.</p><p># The second pass of the <tt>compile</tt> mojo - in the execution called <tt>build-java14-cli</tt> - resets the <tt>source</tt> and <tt>target</tt> versions to <tt>1.3</tt>, and inverts the exclude rule from the first pass. This means the second time around, the compiler will produce 1.4-targeted binaries for the classes matching the <tt>**/cli/*</tt> path pattern.</p><p>Note that prior to Maven 2.2.0, it was much more difficult -
  if not impossible - to compile different subpaths within your project's codebase to target different Java versions.</p></div><div class="section"><h4>Example: Configuring <tt>compile</tt> and <tt>testCompile</tt> mojos separately<a name="Example:_Configuring_compile_and_testCompile_mojos_separately"></a></h4><p>Finally, building on our use of the compiler plugin to tease out these different use cases, consider the case where a user wants to target version 1.4 of the Java specification as his runtime platform. However, he still wants the convenience and other advantages to be found in a unit-testing framework like TestNG. This forces the user to configure the <tt>compile</tt> mojo with one set of <tt>source</tt> and <tt>target</tt> values - specifically, <tt>1.4</tt> - and the <tt>testCompile</tt> mojo with another (<tt>1.5</tt>).</p><p>The resulting compiler-plugin configuration might look something like the following:</p><div class="source"><pre>&lt;plugin&gt;
+  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
+  &lt;executions&gt;
+    &lt;execution&gt;
+      &lt;id&gt;default-compile&lt;/id&gt;
+      &lt;configuration&gt;
+        &lt;source&gt;1.3&lt;/source&gt;
+        &lt;target&gt;1.3&lt;/target&gt;
+      &lt;/configuration&gt;
+    &lt;/execution&gt;
+    &lt;execution&gt;
+      &lt;id&gt;default-testCompile&lt;/id&gt;
+      &lt;configuration&gt;
+        &lt;source&gt;1.5&lt;/source&gt;
+        &lt;target&gt;1.5&lt;/target&gt;
+      &lt;/configuration&gt;
+    &lt;/execution&gt;
+  &lt;/executions&gt;
+&lt;/plugin&gt;</pre></div><p>This example is fairly simple and straightforward. First, the <tt>default-compile</tt> execution sets the <tt>source</tt> and <tt>target</tt> values to <tt>1.3</tt> to allow older Java versions to run the project. Then, the <tt>default-testCompile</tt> execution resets the <tt>source</tt> and <tt>target</tt> values to <tt>1.5</tt>, which enables the project to use tools like TestNG that use annotations.</p><p>Incidentally, it's perhaps useful to point out that the example above is a little bit contrived; the compiler plugin targets Java 1.3 by default, so the only configuration that's really required is the <tt>default-testCompile</tt> execution. The <tt>default-compile</tt> execution respecifies plugin defaults. The only time this might be useful is when a parent POM defines a plugin-level configuration for <tt>source</tt> and <tt>target</tt> that needs to be changed for the purposes of these different compiler executions. This example is meant
  to be illustrative of the potential for separate configuration of default lifecycle mojos to be found in Maven 2.2.0.</p><p>Again, the above configuration would not be possible in older versions of Maven. Starting with Maven 2.2.0, these advanced configurations have become a reality.</p></div></div></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2002-2012
+              The Apache Software Foundation
+            
+                          - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: websites/staging/maven/trunk/content/guides/mini/guide-deployment-security-settings.html
==============================================================================
--- websites/staging/maven/trunk/content/guides/mini/guide-deployment-security-settings.html (added)
+++ websites/staging/maven/trunk/content/guides/mini/guide-deployment-security-settings.html Mon Dec 10 08:17:24 2012
@@ -0,0 +1,268 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ | Generated by Apache Maven Doxia at Dec 10, 2012
+ | Rendered using Apache Maven Stylus Skin 1.5
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Maven - Guide to Deployment and Security Settings</title>
+    <style type="text/css" media="all">
+      @import url("../../css/maven-base.css");
+      @import url("../../css/maven-theme.css");
+      @import url("../../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" />
+        <meta name="author" content="Jason van Zyl" />
+        <meta name="Date-Revision-yyyymmdd" content="20121210" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                              </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../.././" id="bannerLeft">
+                                                <img src="../../images/apache-maven-project-2.png" alt="" />
+                </a>
+                        <span id="bannerRight">
+                                                <img src="../../images/maven-logo-2.gif" alt="" />
+                </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                   <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../../index.html">Maven</a>
+        &gt;
+        Guide to Deployment and Security Settings
+        </div>
+            <div class="xright">        
+                                    Last Published: 2012-12-10
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                   <h5>Main</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../index.html">Welcome</a>
+            </li>
+          </ul>
+                       <h5>Get Maven</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../download.html">Download</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/3.0.4/release-notes.html">Release Notes (3.0.4)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/2.2.1/release-notes.html">Release Notes (2.2.1)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/2.0.11/release-notes.html">Release Notes (2.0.11)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../license.html">License</a>
+            </li>
+          </ul>
+                       <h5>IDE Integration</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../eclipse-plugin.html">Eclipse</a>
+            </li>
+                  <li class="none">
+                  <a href="../../netbeans-module.html">NetBeans</a>
+            </li>
+          </ul>
+                       <h5>About Maven</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../what-is-maven.html">What is Maven?</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-features.html">Features</a>
+            </li>
+                  <li class="none">
+                  <a href="../../general.html">FAQ (official)</a>
+            </li>
+                  <li class="none">
+                  <a href="http://docs.codehaus.org/display/MAVENUSER/FAQs-1" class="externalLink">FAQ (unofficial)</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Maven Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/index.html">Index (category)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../run-maven/index.html">Running Maven</a>
+            </li>
+                                                                                                                                            <li class="collapsed">
+                  <a href="../../users/index.html">User Centre</a>
+                  </li>
+                                                                                                        <li class="collapsed">
+                  <a href="../../plugin-developers/index.html">Plugin Developer Centre</a>
+                  </li>
+                  <li class="none">
+                  <a href="../../repository/index.html">Maven Repository Centre</a>
+            </li>
+                  <li class="none">
+                  <a href="../../developers/index.html">Maven Developer Centre</a>
+            </li>
+                  <li class="none">
+                  <a href="../../articles.html">Books and Resources</a>
+            </li>
+                  <li class="none">
+                  <a href="http://docs.codehaus.org/display/MAVENUSER/Home" class="externalLink">Wiki</a>
+            </li>
+          </ul>
+                       <h5>Community</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../community.html">Community Overview</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/development/guide-helping.html">How to Contribute</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/mini/guide-maven-evangelism.html">Maven Repository</a>
+            </li>
+                  <li class="none">
+                  <a href="../../users/getting-help.html">Getting Help</a>
+            </li>
+                  <li class="none">
+                  <a href="../../issue-tracking.html">Issue Tracking</a>
+            </li>
+                  <li class="none">
+                  <a href="../../source-repository.html">Source Repository</a>
+            </li>
+                  <li class="none">
+                  <a href="../../team-list.html">The Maven Team</a>
+            </li>
+          </ul>
+                       <h5>Project Documentation</h5>
+                  <ul>
+                                                                                                                          <li class="collapsed">
+                  <a href="../../project-info.html">Project Information</a>
+                  </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="../../doxia/index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../../index.html">Maven 2 & 3</a>
+            </li>
+                  <li class="none">
+                  <a href="../../pom/index.html">Parent POMs</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugin-tools/index.html">Plugin Tools</a>
+            </li>
+                  <li class="none">
+                  <a href="../../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../../skins/index.html">Skins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                       <h5>ASF</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink">How Apache Works</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/" class="externalLink">Foundation</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink">Sponsoring Apache</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/thanks.html" class="externalLink">Thanks</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="../../images/logos/maven-feather.png"/>
+        </a>
+                       
+                               </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section"><h2>Security and Deployment Settings<a name="Security_and_Deployment_Settings"></a></h2><p>Repositories to deploy to are defined in a project in the <tt>distributionManagement</tt> section. However, you cannot put your username, password, or other security settings in that project. For that reason, you should add a server definition to your own settings with an id that matches that of the deployment repository in the project.</p><p>In addition, some repositories may require authorisation to download from, so the corresponding settings can be specified in a server element in the same way.</p><p>Which settings are required will depend on the type of repository you are deploying to. As of the first release, only SCP deployments and file deployments are supported by default, so only the following SCP configuration is needed:</p><div class="source"><pre>
+&lt;settings&gt;
+  .
+  .
+  &lt;servers&gt;
+    &lt;server&gt;
+      &lt;id&gt;repo1&lt;/id&gt;
+      &lt;username&gt;repouser&lt;/username&gt;
+      &lt;!-- other optional elements:
+        &lt;password&gt;my_login_password&lt;/password&gt;
+        &lt;privateKey&gt;/path/to/identity&lt;/privateKey&gt; (default is ~/.ssh/id_dsa)
+        &lt;passphrase&gt;my_key_passphrase&lt;/passphrase&gt;
+      --&gt;
+    &lt;/server&gt;
+  &lt;/servers&gt;
+  .
+  .
+&lt;/settings&gt;
+</pre></div><p>To encrypt passwords in these sections, refer to <a href="./guide-encryption.html"> Encryption Settings</a>.</p><p><b>Note</b>: The settings descriptor documentation can be found on the <a href="../../maven-settings/settings.html">Maven Local Settings Model Website</a>.</p></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2002-2012
+              The Apache Software Foundation
+            
+                          - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: websites/staging/maven/trunk/content/guides/mini/guide-encryption.html
==============================================================================
--- websites/staging/maven/trunk/content/guides/mini/guide-encryption.html (added)
+++ websites/staging/maven/trunk/content/guides/mini/guide-encryption.html Mon Dec 10 08:17:24 2012
@@ -0,0 +1,283 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ | Generated by Apache Maven Doxia at Dec 10, 2012
+ | Rendered using Apache Maven Stylus Skin 1.5
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Maven - Password Encryption</title>
+    <style type="text/css" media="all">
+      @import url("../../css/maven-base.css");
+      @import url("../../css/maven-theme.css");
+      @import url("../../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" />
+        <meta name="author" content="Oleg Gusakov" />
+        <meta name="Date-Creation-yyyymmdd" content="20090801" />
+    <meta name="Date-Revision-yyyymmdd" content="20121210" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                              </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../.././" id="bannerLeft">
+                                                <img src="../../images/apache-maven-project-2.png" alt="" />
+                </a>
+                        <span id="bannerRight">
+                                                <img src="../../images/maven-logo-2.gif" alt="" />
+                </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                   <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../../index.html">Maven</a>
+        &gt;
+        Password Encryption
+        </div>
+            <div class="xright">        
+                                    Last Published: 2012-12-10
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                   <h5>Main</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../index.html">Welcome</a>
+            </li>
+          </ul>
+                       <h5>Get Maven</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../download.html">Download</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/3.0.4/release-notes.html">Release Notes (3.0.4)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/2.2.1/release-notes.html">Release Notes (2.2.1)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/2.0.11/release-notes.html">Release Notes (2.0.11)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../license.html">License</a>
+            </li>
+          </ul>
+                       <h5>IDE Integration</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../eclipse-plugin.html">Eclipse</a>
+            </li>
+                  <li class="none">
+                  <a href="../../netbeans-module.html">NetBeans</a>
+            </li>
+          </ul>
+                       <h5>About Maven</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../what-is-maven.html">What is Maven?</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-features.html">Features</a>
+            </li>
+                  <li class="none">
+                  <a href="../../general.html">FAQ (official)</a>
+            </li>
+                  <li class="none">
+                  <a href="http://docs.codehaus.org/display/MAVENUSER/FAQs-1" class="externalLink">FAQ (unofficial)</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Maven Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/index.html">Index (category)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../run-maven/index.html">Running Maven</a>
+            </li>
+                                                                                                                                            <li class="collapsed">
+                  <a href="../../users/index.html">User Centre</a>
+                  </li>
+                                                                                                        <li class="collapsed">
+                  <a href="../../plugin-developers/index.html">Plugin Developer Centre</a>
+                  </li>
+                  <li class="none">
+                  <a href="../../repository/index.html">Maven Repository Centre</a>
+            </li>
+                  <li class="none">
+                  <a href="../../developers/index.html">Maven Developer Centre</a>
+            </li>
+                  <li class="none">
+                  <a href="../../articles.html">Books and Resources</a>
+            </li>
+                  <li class="none">
+                  <a href="http://docs.codehaus.org/display/MAVENUSER/Home" class="externalLink">Wiki</a>
+            </li>
+          </ul>
+                       <h5>Community</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../community.html">Community Overview</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/development/guide-helping.html">How to Contribute</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/mini/guide-maven-evangelism.html">Maven Repository</a>
+            </li>
+                  <li class="none">
+                  <a href="../../users/getting-help.html">Getting Help</a>
+            </li>
+                  <li class="none">
+                  <a href="../../issue-tracking.html">Issue Tracking</a>
+            </li>
+                  <li class="none">
+                  <a href="../../source-repository.html">Source Repository</a>
+            </li>
+                  <li class="none">
+                  <a href="../../team-list.html">The Maven Team</a>
+            </li>
+          </ul>
+                       <h5>Project Documentation</h5>
+                  <ul>
+                                                                                                                          <li class="collapsed">
+                  <a href="../../project-info.html">Project Information</a>
+                  </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="../../doxia/index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../../index.html">Maven 2 & 3</a>
+            </li>
+                  <li class="none">
+                  <a href="../../pom/index.html">Parent POMs</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugin-tools/index.html">Plugin Tools</a>
+            </li>
+                  <li class="none">
+                  <a href="../../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../../skins/index.html">Skins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                       <h5>ASF</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink">How Apache Works</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/" class="externalLink">Foundation</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink">Sponsoring Apache</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/thanks.html" class="externalLink">Thanks</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="../../images/logos/maven-feather.png"/>
+        </a>
+                       
+                               </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <!-- 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. --><!-- NOTE: For help with the syntax of this file, see: --><!-- http://maven.apache.org/doxia/referen
 ces/apt-format.html --><div class="section"><h2><a name="Password_Encryption">Password Encryption</a></h2><ol style="list-style-type: decimal"><li><a href="#Introduction">Introduction</a></li><li><a href="#How_to_create_a_master_password">How to create a master password</a></li><li><a href="#How_to_encrypt_server_passwords">How to encrypt server passwords</a></li><li><a href="#How_to_keep_the_master_password_on_removable_drive">How to keep the master password on removable drive</a></li><li><a href="#Tips">Tips</a></li></ol><div class="section"><h3><a name="Introduction">Introduction</a></h3><p>Maven 2.1.0+ now supports server password encryption. The main use case, addressed by this solution is:</p><ul><li>multiple users share the same build machine (server, CI box)</li><li>some users have the privilege to deploy Maven artifacts to repositories, some don't.<ul><li>this applies to any server operations, requiring authorization, not only deployment</li></ul></li><li><tt>settin
 gs.xml</tt> is shared between users</li></ul><p>The implemented solution adds the following capabilities:</p><ul><li>authorized users have an additional <tt>settings-security.xml</tt> file in their <tt>~/.m2</tt> folder<ul><li>this file either contains encrypted <b>master password</b>, used to encrypt other passwords</li><li>or it can contain a <b>relocation</b> - reference to another file, possibly on removable storage</li><li>this password is created first via CLI for now</li></ul></li><li>server entries in the <tt>settings.xml</tt> have passwords and/or keystore passphrases encrypted<ul><li>for now - this is done via CLI <b>after</b> master password has been created and stored in appropriate location</li></ul></li></ul></div><div class="section"><h3><a name="How_to_create_a_master_password">How to create a master password</a></h3><p>Use the following command line:</p><div class="source"><pre>mvn --encrypt-master-password &lt;password&gt;</pre></div><p><i>Note:</i> This wi
 ll not prompt for a password, so it must be typed on the command-line in plaintext. See <a href="#Tips">Tips</a> below for more information.</p><p>This command will produce an encrypted version of the password, something like</p><div class="source"><pre>{jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+9EF1iFQyJQ=}</pre></div><p>Store this password in the <tt>~/.m2/settings-security.xml</tt>; it should look like</p><div class="source"><pre>&lt;settingsSecurity&gt;
+  &lt;master&gt;{jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+9EF1iFQyJQ=}&lt;/master&gt;
+&lt;/settingsSecurity&gt;</pre></div><p>When this is done, you can start encrypting existing server passwords.</p></div><div class="section"><h3><a name="How_to_encrypt_server_passwords">How to encrypt server passwords</a></h3><p>You will have to use the following command line:</p><div class="source"><pre>mvn --encrypt-password &lt;password&gt;</pre></div><p>This command will produce an encrypted version of it, something like</p><div class="source"><pre>{COQLCE6DU6GtcS5P=}</pre></div><p>Cut-n-paste it into your <tt>settings.xml</tt> file in the server section. This will look like:</p><div class="source"><pre>&lt;settings&gt;
+...
+  &lt;servers&gt;
+...
+    &lt;server&gt;
+      &lt;id&gt;my.server&lt;/id&gt;
+      &lt;username&gt;foo&lt;/username&gt;
+      &lt;password&gt;{COQLCE6DU6GtcS5P=}&lt;/password&gt;
+    &lt;/server&gt;
+...
+  &lt;/servers&gt;
+...
+&lt;/settings&gt;</pre></div><p>Please note that password can contain any information outside of the curly brackets, so that the following will still work:</p><div class="source"><pre>&lt;settings&gt;
+...
+  &lt;servers&gt;
+...
+    &lt;server&gt;
+      &lt;id&gt;my.server&lt;/id&gt;
+      &lt;username&gt;foo&lt;/username&gt;
+      &lt;password&gt;Oleg reset this password on 2009-03-11, expires on 2009-04-11 {COQLCE6DU6GtcS5P=}&lt;/password&gt;
+    &lt;/server&gt;
+...
+  &lt;/servers&gt;
+...
+&lt;/settings&gt;</pre></div><p>Then you can use, say, deploy plugin, to write to this server:</p><div class="source"><pre>mvn deploy:deploy-file -Durl=https://maven.corp.com/repo \
+                       -DrepositoryId=my.server \
+                       -Dfile=your-artifact-1.0.jar \</pre></div></div><div class="section"><h3><a name="How_to_keep_the_master_password_on_removable_drive">How to keep the master password on removable drive</a></h3><p>Create the master password exactly as described above, and store it on a removable drive, for instance on OSX, my USB drive mounts as <tt>/Volumes/mySecureUsb</tt>, so I store</p><div class="source"><pre>&lt;settingsSecurity&gt;
+  &lt;master&gt;{jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+9EF1iFQyJQ=}&lt;/master&gt;
+&lt;/settingsSecurity&gt;</pre></div><p>in the file <tt>/Volumes/mySecureUsb/secure/settings-security.xml</tt></p><p>And then I create <tt>~/.m2/settings-security.xml</tt> with the following content:</p><div class="source"><pre>&lt;settingsSecurity&gt;
+  &lt;relocation&gt;/Volumes/mySecureUsb/secure/settings-security.xml&lt;/relocation&gt;
+&lt;/settingsSecurity&gt;</pre></div><p>This assures that encryption will only work when the usb drive is mounted by OS. This addresses a use case where only certain people are authorized to deploy and are issued these devices.</p></div><div class="section"><h3><a name="Tips">Tips</a></h3><div class="section"><h4>Escaping curly-brace literals in your password <i>(Since: Maven 2.2.0)</i><a name="Escaping_curly-brace_literals_in_your_password_Since:_Maven_2.2.0"></a></h4><p>At times, you might find that your password (or the encrypted form of it) may actually contain '{' or '}' as a literal value. If you added such a password as-is to your settings.xml file, you would find that Maven does strange things with it. Specifically, Maven will treat all the characters preceding the '{' literal, and all the characters after the '}' literal, as comments. Obviously, this is not the behavior you want in such a situation. What you really need is a way of <b>escaping</b> the curly-brace li
 terals in your password.</p><p>Starting in Maven 2.2.0, you can do just this, with the widely used '\' escape character. If your password looks like this:</p><div class="source"><pre>jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+{EF1iFQyJQ=</pre></div><p>Then, the value you would add to your settings.xml would look like this:</p><div class="source"><pre>{jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+\{EF1iFQyJQ=}</pre></div></div><div class="section"><h4>Password Security<a name="Password_Security"></a></h4><p>Editing <tt>settings.xml</tt> and running the above commands can still leave your password stored locally in plaintext. You may want to check the following locations:</p><ul><li>Shell history (e.g. by running <tt>history</tt>). You may want to clear your history after encrypting the above passwords</li><li>Editor caches (e.g. <tt>~/.viminfo</tt>)</li></ul><p>Also note that the encrypted passwords can be decrypted by someone that has the master password and settings security file. Keep this file
  secure (or stored separately) if you expect the possibility that the <tt>settings.xml</tt> file may be retrieved.</p></div></div></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2002-2012
+              The Apache Software Foundation
+            
+                          - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>

Added: websites/staging/maven/trunk/content/guides/mini/guide-generating-sources.html
==============================================================================
--- websites/staging/maven/trunk/content/guides/mini/guide-generating-sources.html (added)
+++ websites/staging/maven/trunk/content/guides/mini/guide-generating-sources.html Mon Dec 10 08:17:24 2012
@@ -0,0 +1,295 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ | Generated by Apache Maven Doxia at Dec 10, 2012
+ | Rendered using Apache Maven Stylus Skin 1.5
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Maven - Guide to generating Sources</title>
+    <style type="text/css" media="all">
+      @import url("../../css/maven-base.css");
+      @import url("../../css/maven-theme.css");
+      @import url("../../css/site.css");
+    </style>
+    <link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" />
+        <meta name="author" content="Jason van Zyl" />
+        <meta name="Date-Revision-yyyymmdd" content="20121210" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                    
+<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
+                                                        
+<script type="text/javascript">_uacct = "UA-140879-1";
+        urchinTracker();</script>
+                              </head>
+  <body class="composite">
+    <div id="banner">
+                                      <a href="../.././" id="bannerLeft">
+                                                <img src="../../images/apache-maven-project-2.png" alt="" />
+                </a>
+                        <span id="bannerRight">
+                                                <img src="../../images/maven-logo-2.gif" alt="" />
+                </span>
+            <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+            
+                                   <div class="xleft">
+                          <a href="http://www.apache.org/" class="externalLink">Apache</a>
+        &gt;
+                  <a href="../../index.html">Maven</a>
+        &gt;
+        Guide to generating Sources
+        </div>
+            <div class="xright">        
+                                    Last Published: 2012-12-10
+            </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+             
+                                                   <h5>Main</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../index.html">Welcome</a>
+            </li>
+          </ul>
+                       <h5>Get Maven</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../download.html">Download</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/3.0.4/release-notes.html">Release Notes (3.0.4)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/2.2.1/release-notes.html">Release Notes (2.2.1)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../docs/2.0.11/release-notes.html">Release Notes (2.0.11)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../license.html">License</a>
+            </li>
+          </ul>
+                       <h5>IDE Integration</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../eclipse-plugin.html">Eclipse</a>
+            </li>
+                  <li class="none">
+                  <a href="../../netbeans-module.html">NetBeans</a>
+            </li>
+          </ul>
+                       <h5>About Maven</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../what-is-maven.html">What is Maven?</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-features.html">Features</a>
+            </li>
+                  <li class="none">
+                  <a href="../../general.html">FAQ (official)</a>
+            </li>
+                  <li class="none">
+                  <a href="http://docs.codehaus.org/display/MAVENUSER/FAQs-1" class="externalLink">FAQ (unofficial)</a>
+            </li>
+          </ul>
+                       <h5>Documentation</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Maven Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/index.html">Index (category)</a>
+            </li>
+                  <li class="none">
+                  <a href="../../run-maven/index.html">Running Maven</a>
+            </li>
+                                                                                                                                            <li class="collapsed">
+                  <a href="../../users/index.html">User Centre</a>
+                  </li>
+                                                                                                        <li class="collapsed">
+                  <a href="../../plugin-developers/index.html">Plugin Developer Centre</a>
+                  </li>
+                  <li class="none">
+                  <a href="../../repository/index.html">Maven Repository Centre</a>
+            </li>
+                  <li class="none">
+                  <a href="../../developers/index.html">Maven Developer Centre</a>
+            </li>
+                  <li class="none">
+                  <a href="../../articles.html">Books and Resources</a>
+            </li>
+                  <li class="none">
+                  <a href="http://docs.codehaus.org/display/MAVENUSER/Home" class="externalLink">Wiki</a>
+            </li>
+          </ul>
+                       <h5>Community</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../community.html">Community Overview</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/development/guide-helping.html">How to Contribute</a>
+            </li>
+                  <li class="none">
+                  <a href="../../guides/mini/guide-maven-evangelism.html">Maven Repository</a>
+            </li>
+                  <li class="none">
+                  <a href="../../users/getting-help.html">Getting Help</a>
+            </li>
+                  <li class="none">
+                  <a href="../../issue-tracking.html">Issue Tracking</a>
+            </li>
+                  <li class="none">
+                  <a href="../../source-repository.html">Source Repository</a>
+            </li>
+                  <li class="none">
+                  <a href="../../team-list.html">The Maven Team</a>
+            </li>
+          </ul>
+                       <h5>Project Documentation</h5>
+                  <ul>
+                                                                                                                          <li class="collapsed">
+                  <a href="../../project-info.html">Project Information</a>
+                  </li>
+          </ul>
+                       <h5>Maven Projects</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="../../ant-tasks/index.html">Ant Tasks</a>
+            </li>
+                  <li class="none">
+                  <a href="../../archetype/index.html">Archetype</a>
+            </li>
+                  <li class="none">
+                  <a href="../../doxia/index.html">Doxia</a>
+            </li>
+                  <li class="none">
+                  <a href="../../jxr/index.html">JXR</a>
+            </li>
+                  <li class="none">
+                  <a href="../../maven-1.x/index.html">Maven 1.x</a>
+            </li>
+                  <li class="none">
+                  <a href="../../index.html">Maven 2 & 3</a>
+            </li>
+                  <li class="none">
+                  <a href="../../pom/index.html">Parent POMs</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugins/index.html">Plugins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../plugin-tools/index.html">Plugin Tools</a>
+            </li>
+                  <li class="none">
+                  <a href="../../scm/index.html">SCM</a>
+            </li>
+                  <li class="none">
+                  <a href="../../shared/index.html">Shared Components</a>
+            </li>
+                  <li class="none">
+                  <a href="../../skins/index.html">Skins</a>
+            </li>
+                  <li class="none">
+                  <a href="../../surefire/index.html">Surefire</a>
+            </li>
+                  <li class="none">
+                  <a href="../../wagon/index.html">Wagon</a>
+            </li>
+          </ul>
+                       <h5>ASF</h5>
+                  <ul>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink">How Apache Works</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/" class="externalLink">Foundation</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink">Sponsoring Apache</a>
+            </li>
+                  <li class="none">
+                  <a href="http://www.apache.org/foundation/thanks.html" class="externalLink">Thanks</a>
+            </li>
+          </ul>
+                                 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+          <img alt="Built by Maven" src="../../images/logos/maven-feather.png"/>
+        </a>
+                       
+                               </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        <div class="section"><h2>Guide to generating sources<a name="Guide_to_generating_sources"></a></h2><p>Let's run though a short example to try and help. To generate sources you must first have a plugin that participates in the <tt>generate-sources</tt> phase like the Antlr plugin:</p><div class="source"><pre>/**
+ * Generates files based on grammar files with Antlr tool.
+ * 
+ * @goal generate
+ * @phase generate-sources
+ * @requiresDependencyResolution compile
+ * @author &lt;a href=&quot;mailto:vincent.siveton@gmail.com&quot;&gt;Vincent Siveton&lt;/a&gt;
+ * @version $Id$
+ */
+public class AntlrPlugin
+    extends AbstractAntlrMojo
+{
+    /**
+     * @see org.apache.maven.plugin.Mojo#execute()
+     */
+    public void execute()
+        throws MojoExecutionException
+    {
+        executeAntlr();
+    }
+
+</pre></div><p>The first two lines say &quot;I want to be fit into the generate-sources phase and my 'handle' is generate&quot;.</p><p>So this is all fine and dandy, we have a plugin that wants to generate some sources from a Antlr grammar but how do we use it. You need to specify that you want to use it in your POM:</p><div class="source"><pre>
+&lt;project&gt;
+  ...
+  &lt;build&gt;
+    &lt;plugins&gt;
+      &lt;plugin&gt;
+        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-antlr-plugin&lt;/artifactId&gt;
+        &lt;version&gt;2.0-beta-1&lt;/version&gt;
+        &lt;configuration&gt;
+          &lt;grammars&gt;java.g&lt;/grammars&gt;
+        &lt;/configuration&gt;
+        &lt;executions&gt;
+          &lt;execution&gt;
+            &lt;goals&gt;
+              &lt;goal&gt;generate&lt;/goal&gt;
+            &lt;/goals&gt;
+          &lt;/execution&gt;
+        &lt;/executions&gt;
+      &lt;/plugin&gt;
+    &lt;/plugins&gt;
+  &lt;/build&gt;
+  ...
+&lt;/project&gt;
+</pre></div><p>If you then type &quot;mvn compile&quot; Maven will walk through the <a href="../introduction/introduction-to-the-lifecycle.html">lifecycle</a> and will eventually hit the <tt>generate-sources</tt> phase and see you have a plugin configured that wants to participate in that phase and the Antlr plugin is executed with your given configuration.</p></div>
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">
+        &#169;            2002-2012
+              The Apache Software Foundation
+            
+                          - <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a>.
+        Apache Maven, Maven, Apache, the Apache feather logo, and the Apache Maven project logos are trademarks of The Apache Software Foundation.
+      </div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>