Author: bentmann Date: Thu May 21 19:24:32 2009 New Revision: 777228 URL: http://svn.apache.org/viewvc?rev=777228&view=rev Log: o Fixed NPE in case of direct goal invocations
Modified: maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java Modified: maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=777228&r1=777227&r2=777228&view=diff ============================================================================== --- maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java (original) +++ maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java Thu May 21 19:24:32 2009 @@ -422,6 +422,12 @@ Plugin p = project.getPlugin( g + ":" + a ); + if ( p == null ) + { + // goal was invoked directly from command line and has no declaration in the POM itself + return; + } + for ( PluginExecution e : p.getExecutions() ) { if ( mojoExecution.getExecutionId().equals( e.getId() ) )