fix goal configuration again

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163686 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-03-24 09:20:04 +00:00
parent b5e30a6ed5
commit 7573893dac
1 changed files with 6 additions and 8 deletions

View File

@ -669,7 +669,7 @@ public class DefaultPluginManager
{ {
String pluginId = getPluginId( goalId ); String pluginId = getPluginId( goalId );
for ( Iterator iterator = project.getPlugins().iterator(); iterator.hasNext() && dom == null; ) for ( Iterator iterator = project.getPlugins().iterator(); iterator.hasNext(); )
{ {
org.apache.maven.model.Plugin plugin = (org.apache.maven.model.Plugin) iterator.next(); org.apache.maven.model.Plugin plugin = (org.apache.maven.model.Plugin) iterator.next();
@ -683,7 +683,7 @@ public class DefaultPluginManager
if ( index >= 0 ) if ( index >= 0 )
{ {
String goalName = goalId.substring( index + 1 ); String goalName = goalId.substring( index + 1 );
for ( Iterator j = plugin.getGoals().iterator(); j.hasNext() && dom == null; ) for ( Iterator j = plugin.getGoals().iterator(); j.hasNext(); )
{ {
Goal goal = (Goal) j.next(); Goal goal = (Goal) j.next();
if ( goal.getId().equals( goalName ) ) if ( goal.getId().equals( goalName ) )
@ -691,16 +691,14 @@ public class DefaultPluginManager
Xpp3Dom goalConfiguration = (Xpp3Dom) goal.getConfiguration(); Xpp3Dom goalConfiguration = (Xpp3Dom) goal.getConfiguration();
if ( goalConfiguration != null ) if ( goalConfiguration != null )
{ {
dom = Xpp3Dom newDom = Xpp3DomUtils.copyXpp3Dom( goalConfiguration );
Xpp3DomUtils.mergeXpp3Dom( Xpp3DomUtils.copyXpp3Dom( goalConfiguration ), dom ); dom = Xpp3DomUtils.mergeXpp3Dom( newDom, dom );
}
else
{
dom = new Xpp3Dom( "configuration" );
} }
break;
} }
} }
} }
break;
} }
} }
} }