Author: brett
Date: Wed Feb  4 10:52:35 2009
New Revision: 740693

URL: http://svn.apache.org/viewvc?rev=740693&view=rev
Log:
[MNG-2668] add some docs about the reactor changes, and the reactor sort order

Added:
    maven/site/trunk/src/site/apt/guides/mini/guide-multiple-modules.apt
Modified:
    maven/site/trunk/src/site/apt/guides/index.apt

Modified: maven/site/trunk/src/site/apt/guides/index.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/guides/index.apt?rev=740693&r1=740692&r2=740693&view=diff
==============================================================================
--- maven/site/trunk/src/site/apt/guides/index.apt (original)
+++ maven/site/trunk/src/site/apt/guides/index.apt Wed Feb  4 10:52:35 2009
@@ -98,6 +98,8 @@
 
  * {{{./mini/guide-maven-classloading.html}Maven Classloading}}
 
+ * {{{./mini/guide-multiple-modules.html}Using Multiple Modules in a Build}}
+
  * {{{./mini/guide-multiple-repositories.html}Using Multiple Repositories}}
 
  * {{{./mini/guide-proxies.html}Using Proxies}}

Added: maven/site/trunk/src/site/apt/guides/mini/guide-multiple-modules.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/guides/mini/guide-multiple-modules.apt?rev=740693&view=auto
==============================================================================
--- maven/site/trunk/src/site/apt/guides/mini/guide-multiple-modules.apt (added)
+++ maven/site/trunk/src/site/apt/guides/mini/guide-multiple-modules.apt Wed 
Feb  4 10:52:35 2009
@@ -0,0 +1,72 @@
+ ------
+ Guide to Working with Multiple Modules
+ ------
+ Brett Porter
+ ------
+ 4 February 2009
+ ------
+
+Guide to Working with Multiple Modules
+
+  As seen in the introduction to the POM, Maven supports project aggregation 
in addition to project inheritance. This section outlines how Maven processes 
projects with multiple modules, and how you can work with them more effectively.
+
+* The Reactor
+
+  The mechanism in Maven that handles multi-module projects is referred to as 
the <reactor>. This part of the Maven core does the following:
+
+    * Collects all the available modules to build
+
+    * Sorts the projects into the correct build order
+
+    * Builds the selected projects in order
+
+** Reactor Sorting
+
+  Because modules within a multi-module build can depend on each other, it is 
important that The reactor sorts all the projects in a way that guarantees any 
project is built before it is required.
+
+  The following relationships are honoured when sorting projects:
+
+    * a project dependency on another module in the build
+
+    * a plugin declaration where the plugin is another modules in the build
+
+    * a plugin dependency on another module in the build
+
+    * a build extension declaration on another module in the build
+
+    * the order declared in the <<<\<modules\>>>> element (if no other rule 
applies)
+
+  Note that only "instantiated" references are used - 
<<<dependencyManagement>>> and <<<pluginManagement>>> elements will not cause a 
change to the reactor sort order
+
+** Command Line Options
+
+  No special configuration is required to take advantage of the reactor, 
however it is possible to customize its behavior.
+
+  The following command line switches are available:
+
+    * <<<-r>>> - ignore the modules declared in the current project, and 
instead build the list of projects listed after the <<<-r>>> switch (which may 
include wildcards)
+
+    * <<<--resume-from>>> - resumes a reactor the specified project (e.g. when 
it fails in the middle)
+
+    * <<<--also-make>>> - build the specified projects, and any of their 
dependencies in the reactor
+
+    * <<<--also-make-dependents>>> - build the specified projects, and any 
that depend on them
+
+    * <<<--fail-fast>>> - the default behavior - whenever a module build 
fails, stop the overall build immediately
+
+    * <<<--fail-at-end>>> - if a particular module build fails, continue the 
rest of the reactor and report all failed modules at the end instead
+
+    * <<<--non-recursive>>> - do not use a reactor build, even if the current 
project declares modules and just build the project in the current directory
+
+  Refer to the Maven command line interface reference for more information on 
these switches.
+
+** The Reactor Plugin
+
+  For versions of Maven prior to Maven 2.1, or for additional capabilities 
with the reactor such as building only the modules with SCM changes, the 
Reactor plugin can be used to further customize the execution of the projects.
+  For information on how to use this, refer to the 
{{{/plugins/maven-reactor-plugin/index.html} Reactor Plugin documentation}}.
+
+* More information
+
+  * {{{http://www.sonatype.com/books/maven-book/reference/multimodule.html} 
Chapter 6. A Multi-module Project (Maven: The Definitive Guide)}}
+
+


Reply via email to