mirror of https://github.com/apache/maven.git
[MNG-2103] Inheritance of <plugin> overrides that of <execution>
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@931125 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
37a0e64aa0
commit
997c3110c6
maven-model-builder/src/main/java/org/apache/maven/model
|
@ -123,16 +123,14 @@ public class DefaultInheritanceAssembler
|
||||||
for ( Plugin element : src )
|
for ( Plugin element : src )
|
||||||
{
|
{
|
||||||
Object key = getPluginKey( element );
|
Object key = getPluginKey( element );
|
||||||
if ( element.isInherited() )
|
|
||||||
{
|
|
||||||
// NOTE: Enforce recursive merge to trigger merging/inheritance logic for executions as well
|
|
||||||
Plugin plugin = new Plugin();
|
|
||||||
plugin.setGroupId( element.getGroupId() );
|
|
||||||
plugin.setArtifactId( element.getArtifactId() );
|
|
||||||
mergePlugin( plugin, element, sourceDominant, context );
|
|
||||||
|
|
||||||
master.put( key, plugin );
|
// NOTE: Enforce recursive merge to trigger merging/inheritance logic for executions
|
||||||
}
|
Plugin plugin = new Plugin();
|
||||||
|
plugin.setGroupId( element.getGroupId() );
|
||||||
|
plugin.setArtifactId( element.getArtifactId() );
|
||||||
|
mergePlugin( plugin, element, sourceDominant, context );
|
||||||
|
|
||||||
|
master.put( key, plugin );
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Object, List<Plugin>> predecessors = new LinkedHashMap<Object, List<Plugin>>();
|
Map<Object, List<Plugin>> predecessors = new LinkedHashMap<Object, List<Plugin>>();
|
||||||
|
|
|
@ -470,7 +470,7 @@ public class MavenModelMerger
|
||||||
|
|
||||||
for ( PluginExecution element : src )
|
for ( PluginExecution element : src )
|
||||||
{
|
{
|
||||||
if ( sourceDominant || ( source.isInherited() && element.isInherited() ) )
|
if ( sourceDominant || ( element.getInherited() != null ? element.isInherited() : source.isInherited() ) )
|
||||||
{
|
{
|
||||||
Object key = getPluginExecutionKey( element );
|
Object key = getPluginExecutionKey( element );
|
||||||
merged.put( key, element );
|
merged.put( key, element );
|
||||||
|
|
Loading…
Reference in New Issue