You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2009/06/22 01:38:52 UTC
svn commit: r787114 -
/maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
Author: olamy
Date: Sun Jun 21 23:38:51 2009
New Revision: 787114
URL: http://svn.apache.org/viewvc?rev=787114&view=rev
Log:
more details on the NPE cause.
Modified:
maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=787114&r1=787113&r2=787114&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java Sun Jun 21 23:38:51 2009
@@ -352,6 +352,14 @@
//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<MojoExecution> mojos = new ArrayList<MojoExecution>();