diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/goal/phase/GoalMappingPhase.java b/maven-core/src/main/java/org/apache/maven/lifecycle/goal/phase/GoalMappingPhase.java index eadd3d8b85..b3e625e1d5 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/goal/phase/GoalMappingPhase.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/goal/phase/GoalMappingPhase.java @@ -59,6 +59,7 @@ public class GoalMappingPhase try { session.addImpliedExecution( goal, prereq ); + visited.add( prereq ); } catch ( CycleDetectedException e ) @@ -80,6 +81,7 @@ public class GoalMappingPhase public void visitGoal( String goal, MavenSession session ) throws GraphTraversalException { session.addSingleExecution( goal ); + visited.add( goal ); }