mirror of https://github.com/apache/maven.git
[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:
parent
1c89925872
commit
cf01846d8d
|
@ -587,7 +587,7 @@ public final class ModelUtils
|
||||||
|
|
||||||
Build clone = new Build();
|
Build clone = new Build();
|
||||||
|
|
||||||
assembler.assembleBuildInheritance( clone, build );
|
assembler.assembleBuildInheritance( clone, build, false );
|
||||||
|
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,14 +291,15 @@ public class DefaultModelInheritanceAssembler
|
||||||
child.setBuild( childBuild );
|
child.setBuild( childBuild );
|
||||||
}
|
}
|
||||||
|
|
||||||
assembleBuildInheritance( childBuild, parentBuild );
|
assembleBuildInheritance( childBuild, parentBuild, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Remove this!
|
// TODO: Remove this!
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void assembleBuildInheritance( Build childBuild,
|
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
|
// The build has been set but we want to step in here and fill in
|
||||||
// values that have not been set by the child.
|
// values that have not been set by the child.
|
||||||
|
@ -361,7 +362,7 @@ public class DefaultModelInheritanceAssembler
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugins are aggregated if Plugin.inherit != false
|
// Plugins are aggregated if Plugin.inherit != false
|
||||||
ModelUtils.mergePluginLists( childBuild, parentBuild, true );
|
ModelUtils.mergePluginLists( childBuild, parentBuild, handleAsInheritance );
|
||||||
|
|
||||||
// Plugin management :: aggregate
|
// Plugin management :: aggregate
|
||||||
PluginManagement dominantPM = childBuild.getPluginManagement();
|
PluginManagement dominantPM = childBuild.getPluginManagement();
|
||||||
|
|
|
@ -35,7 +35,8 @@ public interface ModelInheritanceAssembler
|
||||||
void assembleModelInheritance( Model child, Model parent );
|
void assembleModelInheritance( Model child, Model parent );
|
||||||
|
|
||||||
void assembleBuildInheritance( Build childBuild,
|
void assembleBuildInheritance( Build childBuild,
|
||||||
Build parentBuild );
|
Build parentBuild,
|
||||||
|
boolean handleAsInheriance );
|
||||||
|
|
||||||
void copyModel( Model dest, Model source );
|
void copyModel( Model dest, Model source );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue