From ccd2cd2e1aa4c3078fbb97848bb2d2c185fc55bd Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Sun, 21 Jun 2009 23:38:51 +0000 Subject: [PATCH] more details on the NPE cause. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@787114 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/lifecycle/DefaultLifecycleExecutor.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 4d23ddc463..632628372a 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 @@ -352,6 +352,14 @@ public class DefaultLifecycleExecutor //TODO: need to separate the lifecycles + if ( lifecycle == null ) + { + logger.info( "Invalid task '" + + lifecyclePhase + + "' : you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal" ); + throw new MojoNotFoundException( lifecyclePhase, null ); + } + for ( String phase : lifecycle.getPhases() ) { List mojos = new ArrayList();