[MNG-3654] Make sure all plugins are carried over into cloned build instances.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@674893 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2008-07-08 17:37:45 +00:00
parent 1c89925872
commit cf01846d8d
3 changed files with 7 additions and 5 deletions

View File

@ -587,7 +587,7 @@ public final class ModelUtils
Build clone = new Build();
assembler.assembleBuildInheritance( clone, build );
assembler.assembleBuildInheritance( clone, build, false );
return clone;
}

View File

@ -291,14 +291,15 @@ public class DefaultModelInheritanceAssembler
child.setBuild( childBuild );
}
assembleBuildInheritance( childBuild, parentBuild );
assembleBuildInheritance( childBuild, parentBuild, true );
}
}
// TODO: Remove this!
@SuppressWarnings("unchecked")
public void assembleBuildInheritance( Build childBuild,
Build parentBuild )
Build parentBuild,
boolean handleAsInheritance )
{
// The build has been set but we want to step in here and fill in
// values that have not been set by the child.
@ -361,7 +362,7 @@ public class DefaultModelInheritanceAssembler
}
// Plugins are aggregated if Plugin.inherit != false
ModelUtils.mergePluginLists( childBuild, parentBuild, true );
ModelUtils.mergePluginLists( childBuild, parentBuild, handleAsInheritance );
// Plugin management :: aggregate
PluginManagement dominantPM = childBuild.getPluginManagement();

View File

@ -35,7 +35,8 @@ public interface ModelInheritanceAssembler
void assembleModelInheritance( Model child, Model parent );
void assembleBuildInheritance( Build childBuild,
Build parentBuild );
Build parentBuild,
boolean handleAsInheriance );
void copyModel( Model dest, Model source );
}