maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r921579 - /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
Date Wed, 10 Mar 2010 21:30:48 GMT
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()
);
                         }
                     }



Mime
View raw message