[MNG-4580] Plugin dependencies for module ignored when building from aggregator project using direct plugin invocation

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@921579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-03-10 21:30:47 +00:00
parent 22585104f6
commit c5e7758e3e
1 changed files with 10 additions and 6 deletions

View File

@ -790,7 +790,9 @@ public class DefaultLifecycleExecutor
{ {
if ( task instanceof GoalTask ) if ( task instanceof GoalTask )
{ {
MojoDescriptor mojoDescriptor = ( (GoalTask) task ).mojoDescriptor; String pluginGoal = ( (GoalTask) task ).pluginGoal;
MojoDescriptor mojoDescriptor = getMojoDescriptor( pluginGoal, session, project );
MojoExecution mojoExecution = MojoExecution mojoExecution =
new MojoExecution( mojoDescriptor, "default-cli", MojoExecution.Source.CLI ); new MojoExecution( mojoDescriptor, "default-cli", MojoExecution.Source.CLI );
@ -868,7 +870,7 @@ public class DefaultLifecycleExecutor
taskSegments.add( currentSegment ); taskSegments.add( currentSegment );
} }
currentSegment.tasks.add( new GoalTask( mojoDescriptor ) ); currentSegment.tasks.add( new GoalTask( task ) );
} }
else else
{ {
@ -937,17 +939,17 @@ public class DefaultLifecycleExecutor
private static final class GoalTask private static final class GoalTask
{ {
final MojoDescriptor mojoDescriptor; final String pluginGoal;
GoalTask( MojoDescriptor mojoDescriptor ) GoalTask( String pluginGoal )
{ {
this.mojoDescriptor = mojoDescriptor; this.pluginGoal = pluginGoal;
} }
@Override @Override
public String toString() public String toString()
{ {
return mojoDescriptor.getId(); return pluginGoal;
} }
} }
@ -1092,6 +1094,7 @@ public class DefaultLifecycleExecutor
for ( String goal : execution.getGoals() ) for ( String goal : execution.getGoals() )
{ {
MojoExecution mojoExecution = new MojoExecution( plugin, goal, execution.getId() ); MojoExecution mojoExecution = new MojoExecution( plugin, goal, execution.getId() );
mojoExecution.setLifecyclePhase( execution.getPhase() );
addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() ); addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() );
} }
} }
@ -1108,6 +1111,7 @@ public class DefaultLifecycleExecutor
if ( phaseBindings != null ) if ( phaseBindings != null )
{ {
MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, execution.getId() ); MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, execution.getId() );
mojoExecution.setLifecyclePhase( mojoDescriptor.getPhase() );
addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() ); addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() );
} }
} }