mirror of https://github.com/apache/maven.git
o Added check for null MojoDescriptor in the lifecycle context (throws GoalNotFoundException if == null)
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162940 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8b4d55e55d
commit
567a47cf82
|
@ -17,6 +17,7 @@ package org.apache.maven.lifecycle.phase;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.GoalNotFoundException;
|
||||
import org.apache.maven.decoration.GoalDecorator;
|
||||
import org.apache.maven.decoration.GoalDecoratorBindings;
|
||||
import org.apache.maven.lifecycle.AbstractMavenLifecyclePhase;
|
||||
|
@ -47,7 +48,12 @@ public class GoalResolutionPhase extends AbstractMavenLifecyclePhase
|
|||
pluginManager = (PluginManager) context.getContainer().lookup( PluginManager.ROLE );
|
||||
|
||||
// First, start by retrieving the currently-requested goal.
|
||||
String goal = context.getMojoDescriptor().getId();
|
||||
MojoDescriptor goalDescriptor = context.getMojoDescriptor();
|
||||
if(goalDescriptor == null) {
|
||||
throw new GoalNotFoundException(context.getGoalName());
|
||||
}
|
||||
|
||||
String goal = goalDescriptor.getId();
|
||||
|
||||
List resolvedGoals = resolveTopLevel( goal, new HashSet(), new LinkedList(), context, pluginManager );
|
||||
|
||||
|
|
Loading…
Reference in New Issue