mirror of https://github.com/apache/maven.git
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:
parent
c4cab3edfa
commit
30eedfb626
|
@ -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 );
|
||||||
|
|
Loading…
Reference in New Issue