[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 @@ private MavenExecutionPlan calculateExecutionPlan( MavenSession session, MavenPr
{
if ( task instanceof GoalTask )
{
MojoDescriptor mojoDescriptor = ( (GoalTask) task ).mojoDescriptor;
String pluginGoal = ( (GoalTask) task ).pluginGoal;
MojoDescriptor mojoDescriptor = getMojoDescriptor( pluginGoal, session, project );
MojoExecution mojoExecution =
new MojoExecution( mojoDescriptor, "default-cli", MojoExecution.Source.CLI );
@ -868,7 +870,7 @@ private List<TaskSegment> calculateTaskSegments( MavenSession session, List<Stri
taskSegments.add( currentSegment );
}
currentSegment.tasks.add( new GoalTask( mojoDescriptor ) );
currentSegment.tasks.add( new GoalTask( task ) );
}
else
{
@ -937,17 +939,17 @@ public String toString()
private static final class GoalTask
{
final MojoDescriptor mojoDescriptor;
final String pluginGoal;
GoalTask( MojoDescriptor mojoDescriptor )
GoalTask( String pluginGoal )
{
this.mojoDescriptor = mojoDescriptor;
this.pluginGoal = pluginGoal;
}
@Override
public String toString()
{
return mojoDescriptor.getId();
return pluginGoal;
}
}
@ -1092,6 +1094,7 @@ private Map<String, List<MojoExecution>> calculateLifecycleMappings( MavenSessio
for ( String goal : execution.getGoals() )
{
MojoExecution mojoExecution = new MojoExecution( plugin, goal, execution.getId() );
mojoExecution.setLifecyclePhase( execution.getPhase() );
addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() );
}
}
@ -1108,6 +1111,7 @@ private Map<String, List<MojoExecution>> calculateLifecycleMappings( MavenSessio
if ( phaseBindings != null )
{
MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, execution.getId() );
mojoExecution.setLifecyclePhase( mojoDescriptor.getPhase() );
addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() );
}
}