improve error message

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@165604 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-05-02 08:19:01 +00:00
parent f214098416
commit 6bb39db726
1 changed files with 5 additions and 0 deletions

View File

@ -316,6 +316,7 @@ public class DefaultLifecycleExecutor
* @param mojoDescriptor
*/
private void configureMojo( MojoDescriptor mojoDescriptor, Map phaseMap, Settings settings )
throws LifecycleExecutionException
{
if ( settings.getActiveProfile().isOffline() && mojoDescriptor.requiresOnline() )
{
@ -328,6 +329,10 @@ public class DefaultLifecycleExecutor
{
Phase phase = (Phase) phaseMap.get( mojoDescriptor.getPhase() );
if ( phase == null )
{
throw new LifecycleExecutionException( "Required phase '" + mojoDescriptor.getPhase() + "' not found" );
}
phase.getGoals().add( mojoDescriptor.getId() );
}
}