mirror of
https://github.com/apache/maven.git
synced 2025-03-07 00:59:51 +00:00
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 @@ private void processPluginPhases( Plugin plugin, MavenSession session, Map phase
|
||||
* @param mojoDescriptor
|
||||
*/
|
||||
private void configureMojo( MojoDescriptor mojoDescriptor, Map phaseMap, Settings settings )
|
||||
throws LifecycleExecutionException
|
||||
{
|
||||
if ( settings.getActiveProfile().isOffline() && mojoDescriptor.requiresOnline() )
|
||||
{
|
||||
@ -328,6 +329,10 @@ private void configureMojo( MojoDescriptor mojoDescriptor, Map phaseMap, Setting
|
||||
{
|
||||
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…
x
Reference in New Issue
Block a user