Author: jdcasey
Date: Thu Feb  7 17:06:16 2008
New Revision: 619721

URL: http://svn.apache.org/viewvc?rev=619721&view=rev
Log:
Putting aggregator skip logic from previous commit ahead of warning messages, 
and adding some doco to the javadoc for the method to note the skip behavior.

Modified:
    
maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Modified: 
maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=619721&r1=619720&r2=619721&view=diff
==============================================================================
--- 
maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 (original)
+++ 
maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
 Thu Feb  7 17:06:16 2008
@@ -473,6 +473,10 @@
      * flag), and execute the mojo. If any of these steps fails, this method 
will
      * consult with the [EMAIL PROTECTED] ReactorManager} to determine whether 
the build
      * should be stopped.
+     * <br />
+     * <b>NOTE:</b> If the binding is an aggregator mojo, and the specified 
project
+     * is not the root project of the reactor (using [EMAIL PROTECTED] 
ReactorManager#getTopLevelProject()},
+     * then print a DEBUG message and skip that execution.
      */
     private void executeGoalAndHandleFailures( final MojoBinding mojoBinding,
                                                final MavenSession session,
@@ -519,13 +523,13 @@
 
             MojoDescriptor mojoDescriptor = pluginDescriptor.getMojo( 
mojoBinding.getGoal() );
 
-            validateMojoExecution( mojoBinding, mojoDescriptor, project, 
allowAggregators );
-
             if ( mojoDescriptor.isAggregator() && ( project != 
rm.getTopLevelProject() ) )
             {
                 getLogger().debug( "Skipping mojo execution: " + 
MojoBindingUtils.toString( mojoBinding ) + "\nfor project: " + project.getId() 
+ "\n\nIt is an aggregator mojo, and the current project is not the root 
project for the reactor." );
                 return;
             }
+
+            validateMojoExecution( mojoBinding, mojoDescriptor, project, 
allowAggregators );
 
             MojoExecution mojoExecution = new MojoExecution( mojoDescriptor );
 


Reply via email to