each task on the CLI is to be executed individually - don't preprocess all the goals.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163432 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-02-28 22:57:39 +00:00
parent b70904c7a3
commit 7b1ca71aac
1 changed files with 16 additions and 21 deletions

View File

@ -81,12 +81,12 @@ public MavenExecutionResponse execute( List tasks, MavenSession session )
processPluginConfiguration( session.getProject(), session );
processGoalChain( tasks, session );
for ( Iterator i = tasks.iterator(); i.hasNext(); )
{
String task = (String) i.next();
processGoalChain( task, session );
if ( phaseMap.containsKey( task ) )
{
executePhase( task, session, response );
@ -154,37 +154,32 @@ private void processPluginPhases( String pluginId, MavenSession mavenSession )
}
}
private void processGoalChain( List tasks, MavenSession session )
private void processGoalChain( String task, MavenSession session )
throws Exception
{
for ( Iterator i = tasks.iterator(); i.hasNext(); )
if ( phaseMap.containsKey( task ) )
{
String task = (String) i.next();
// only execute up to the given phase
int index = phases.indexOf( phaseMap.get( task ) );
if ( phaseMap.containsKey( task ) )
for ( int j = 0; j <= index; j++ )
{
// only execute up to the given phase
int index = phases.indexOf( phaseMap.get( task ) );
Phase p = (Phase) phases.get( j );
for ( int j = 0; j <= index; j++ )
if ( p.getGoals() != null )
{
Phase p = (Phase) phases.get( j );
if ( p.getGoals() != null )
for ( Iterator k = p.getGoals().iterator(); k.hasNext(); )
{
for ( Iterator k = p.getGoals().iterator(); k.hasNext(); )
{
String goal = (String) k.next();
String goal = (String) k.next();
verifyMojoPhase( goal, session );
}
verifyMojoPhase( goal, session );
}
}
}
else
{
verifyMojoPhase( task, session );
}
}
else
{
verifyMojoPhase( task, session );
}
}