From 4935728adeca6daf42355a949cab4ee56759543d Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Wed, 17 Aug 2005 20:50:27 +0000 Subject: [PATCH] Adding warning output for when a mojo is scrubbed from a forked lifecycle, as in MNG-709. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@233260 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/lifecycle/DefaultLifecycleExecutor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java index 0cac045824..e43caf5981 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java @@ -547,8 +547,10 @@ public class DefaultLifecycleExecutor { List tasks = (List) it.next(); - tasks.remove( mojoIdWithVersion ); - tasks.remove( mojoIdWithoutVersion ); + if ( tasks.remove( mojoIdWithVersion ) || tasks.remove( mojoIdWithoutVersion ) ) + { + getLogger().warn( "Removing: " + mojoDescriptor.getGoal() + " from forked lifecycle, to prevent recursive invocation of this mojo." ); + } } }