From fba1a8f5e74a04c80ac32a753024608ae57802fb Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Tue, 25 Aug 2009 14:22:10 +0000 Subject: [PATCH] o Tweaked error reporting git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@807646 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/lifecycle/DefaultLifecycleExecutor.java | 3 --- .../maven/lifecycle/LifecyclePhaseNotFoundException.java | 4 +++- 2 files changed, 3 insertions(+), 4 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 ef11dd0c63..5da86695b7 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 @@ -719,9 +719,6 @@ public class DefaultLifecycleExecutor if ( lifecycle == null ) { - logger.info( "Invalid task '" + lifecyclePhase + "' : you must specify a valid lifecycle phase" - + ", or a goal in the format : or" - + " :::" ); throw new LifecyclePhaseNotFoundException( lifecyclePhase ); } diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecyclePhaseNotFoundException.java b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecyclePhaseNotFoundException.java index 383ac55086..a23dfb6de8 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/LifecyclePhaseNotFoundException.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/LifecyclePhaseNotFoundException.java @@ -37,7 +37,9 @@ public class LifecyclePhaseNotFoundException */ public LifecyclePhaseNotFoundException( String lifecyclePhase ) { - super( "Unknown lifecycle phase " + lifecyclePhase ); + super( "Unknown lifecycle phase \"" + lifecyclePhase + "\". You must specify a valid lifecycle phase" + + " or a goal in the format : or" + + " :[:]:" ); this.lifecyclePhase = ( lifecyclePhase != null ) ? lifecyclePhase : ""; }