add missing error message when the package goal is not found

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163451 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-03-03 11:19:45 +00:00
parent c4cab3edfa
commit 30eedfb626
1 changed files with 6 additions and 1 deletions

View File

@ -211,7 +211,12 @@ public class DefaultLifecycleExecutor
{ {
pluginManager.verifyPluginForGoal( task, session ); pluginManager.verifyPluginForGoal( task, session );
mojoDescriptor = pluginManager.getMojoDescriptor( task ); mojoDescriptor = pluginManager.getMojoDescriptor( task );
if ( mojoDescriptor != null && mojoDescriptor.getPhase() != null ) if ( mojoDescriptor == null )
{
throw new LifecycleExecutionException( "Required goal not found: " + task );
}
if ( mojoDescriptor.getPhase() != null )
{ {
Phase phase = (Phase) phaseMap.get( mojoDescriptor.getPhase() ); Phase phase = (Phase) phaseMap.get( mojoDescriptor.getPhase() );
phase.getGoals().add( task ); phase.getGoals().add( task );