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.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@619721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2008-02-08 01:06:16 +00:00
parent 34c390602c
commit 80f538bc52
1 changed files with 6 additions and 2 deletions

View File

@ -473,6 +473,10 @@ public class DefaultLifecycleExecutor
* flag), and execute the mojo. If any of these steps fails, this method will
* consult with the {@link 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 {@link ReactorManager#getTopLevelProject()},
* then print a DEBUG message and skip that execution.
*/
private void executeGoalAndHandleFailures( final MojoBinding mojoBinding,
final MavenSession session,
@ -519,14 +523,14 @@ public class DefaultLifecycleExecutor
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 );
mojoExecution.setConfiguration( (Xpp3Dom) mojoBinding.getConfiguration() );