You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/03/10 22:30:48 UTC

svn commit: r921579 - /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Author: bentmann
Date: Wed Mar 10 21:30:47 2010
New Revision: 921579

URL: http://svn.apache.org/viewvc?rev=921579&view=rev
Log:
[MNG-4580] Plugin dependencies for module ignored when building from aggregator project using direct plugin invocation

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

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=921579&r1=921578&r2=921579&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java (original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java Wed Mar 10 21:30:47 2010
@@ -790,7 +790,9 @@ public class DefaultLifecycleExecutor
         {
             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 @@ public class DefaultLifecycleExecutor
                     taskSegments.add( currentSegment );
                 }
 
-                currentSegment.tasks.add( new GoalTask( mojoDescriptor ) );
+                currentSegment.tasks.add( new GoalTask( task ) );
             }
             else
             {
@@ -937,17 +939,17 @@ public class DefaultLifecycleExecutor
     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 @@ public class DefaultLifecycleExecutor
                         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 @@ public class DefaultLifecycleExecutor
                         if ( phaseBindings != null )
                         {
                             MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, execution.getId() );
+                            mojoExecution.setLifecyclePhase( mojoDescriptor.getPhase() );
                             addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() );
                         }
                     }