o removed the current mojo descriptor stuff from the goal execution context...doesn't seem to be used anywhere, and it'll cause problems if the current goal is from a plugin that has not been resolved yet.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163135 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2004-09-22 00:23:35 +00:00
parent 717f716b4f
commit 90c3f69e1c
3 changed files with 5 additions and 33 deletions

View File

@ -23,19 +23,17 @@ public class MavenGoalExecutionContext
private FailureResponse failureResponse; private FailureResponse failureResponse;
private MojoDescriptor mojoDescriptor;
private List resolvedGoals; private List resolvedGoals;
// private GoalDecoratorBindings goalDecoratorBindings; // private GoalDecoratorBindings goalDecoratorBindings;
private String goalName; private String goalName;
public MavenGoalExecutionContext( MavenSession session, MojoDescriptor goal ) public MavenGoalExecutionContext( MavenSession session, String goalName )
{ {
this.session = session; this.session = session;
this.mojoDescriptor = goal; this.goalName = goalName;
} }
public MavenSession getSession() public MavenSession getSession()
@ -79,21 +77,6 @@ public class MavenGoalExecutionContext
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
public boolean requiresDependencyResolution()
{
return mojoDescriptor.requiresDependencyResolution();
}
public MojoDescriptor getMojoDescriptor()
{
return mojoDescriptor;
}
public void setMojoDescriptor( MojoDescriptor mojoDescriptor )
{
this.mojoDescriptor = mojoDescriptor;
}
public List getResolvedGoals() public List getResolvedGoals()
{ {
return resolvedGoals; return resolvedGoals;

View File

@ -43,7 +43,7 @@ public class GoalExecutionPhase
MavenGoalExecutionContext context; MavenGoalExecutionContext context;
context = new MavenGoalExecutionContext( session, session.getPluginManager().getMojoDescriptor( goal ) ); context = new MavenGoalExecutionContext( session, goal );
context.setGoalName( goal ); context.setGoalName( goal );
@ -51,7 +51,7 @@ public class GoalExecutionPhase
if ( context.isExecutionFailure() ) if ( context.isExecutionFailure() )
{ {
response.setExecutionFailure( context.getMojoDescriptor().getId(), context.getFailureResponse() ); response.setExecutionFailure( context.getGoalName(), context.getFailureResponse() );
break; break;
} }

View File

@ -126,18 +126,7 @@ public class MavenTestCase
pluginManager.setLocalRepository( localRepository ); pluginManager.setLocalRepository( localRepository );
MojoDescriptor descriptor; MavenGoalExecutionContext context = new MavenGoalExecutionContext( session, goal );
if ( goal != null )
{
descriptor = pluginManager.getMojoDescriptor( goal );
}
else
{
descriptor = new MojoDescriptor();
}
MavenGoalExecutionContext context = new MavenGoalExecutionContext( session, descriptor );
return context; return context;
} }