mirror of https://github.com/apache/maven.git
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:
parent
f214098416
commit
6bb39db726
|
@ -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() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue