diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java index 1a39c15939..c572e764a0 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java @@ -265,6 +265,10 @@ public class DefaultPluginManager PluginExecutionResponse response; MojoDescriptor mojoDescriptor = getMojoDescriptor( goalName ); + if ( mojoDescriptor == null ) + { + throw new GoalExecutionException( "Unable to find goal: " + goalName ); + } if ( mojoDescriptor.requiresDependencyResolution() ) {