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();