mirror of https://github.com/apache/maven.git
[MNG-4677] [regression] Plugin configuration incorrectly inherited from parent pom
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@945294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c3d23fe671
commit
bdecdcf64a
|
@ -122,15 +122,18 @@ public class DefaultInheritanceAssembler
|
||||||
|
|
||||||
for ( Plugin element : src )
|
for ( Plugin element : src )
|
||||||
{
|
{
|
||||||
Object key = getPluginKey( element );
|
if ( element.isInherited() || !element.getExecutions().isEmpty() )
|
||||||
|
{
|
||||||
|
// 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 );
|
||||||
|
|
||||||
// NOTE: Enforce recursive merge to trigger merging/inheritance logic for executions
|
Object key = getPluginKey( element );
|
||||||
Plugin plugin = new Plugin();
|
|
||||||
plugin.setGroupId( element.getGroupId() );
|
|
||||||
plugin.setArtifactId( element.getArtifactId() );
|
|
||||||
mergePlugin( plugin, element, sourceDominant, context );
|
|
||||||
|
|
||||||
master.put( key, plugin );
|
master.put( key, plugin );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Object, List<Plugin>> predecessors = new LinkedHashMap<Object, List<Plugin>>();
|
Map<Object, List<Plugin>> predecessors = new LinkedHashMap<Object, List<Plugin>>();
|
||||||
|
@ -173,6 +176,21 @@ public class DefaultInheritanceAssembler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mergePlugin( Plugin target, Plugin source, boolean sourceDominant, Map<Object, Object> context )
|
||||||
|
{
|
||||||
|
if ( source.isInherited() )
|
||||||
|
{
|
||||||
|
mergeConfigurationContainer( target, source, sourceDominant, context );
|
||||||
|
}
|
||||||
|
mergePlugin_GroupId( target, source, sourceDominant, context );
|
||||||
|
mergePlugin_ArtifactId( target, source, sourceDominant, context );
|
||||||
|
mergePlugin_Version( target, source, sourceDominant, context );
|
||||||
|
mergePlugin_Extensions( target, source, sourceDominant, context );
|
||||||
|
mergePlugin_Dependencies( target, source, sourceDominant, context );
|
||||||
|
mergePlugin_Executions( target, source, sourceDominant, context );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mergeReporting_Plugins( Reporting target, Reporting source, boolean sourceDominant,
|
protected void mergeReporting_Plugins( Reporting target, Reporting source, boolean sourceDominant,
|
||||||
Map<Object, Object> context )
|
Map<Object, Object> context )
|
||||||
|
|
Loading…
Reference in New Issue