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
|
@ -123,9 +123,8 @@ public class DefaultInheritanceAssembler
|
|||
for ( Plugin element : src )
|
||||
{
|
||||
Object key = getPluginKey( element );
|
||||
if ( element.isInherited() )
|
||||
{
|
||||
// NOTE: Enforce recursive merge to trigger merging/inheritance logic for executions as well
|
||||
|
||||
// NOTE: Enforce recursive merge to trigger merging/inheritance logic for executions
|
||||
Plugin plugin = new Plugin();
|
||||
plugin.setGroupId( element.getGroupId() );
|
||||
plugin.setArtifactId( element.getArtifactId() );
|
||||
|
@ -133,7 +132,6 @@ public class DefaultInheritanceAssembler
|
|||
|
||||
master.put( key, plugin );
|
||||
}
|
||||
}
|
||||
|
||||
Map<Object, List<Plugin>> predecessors = new LinkedHashMap<Object, List<Plugin>>();
|
||||
List<Plugin> pending = new ArrayList<Plugin>();
|
||||
|
|
|
@ -470,7 +470,7 @@ public class MavenModelMerger
|
|||
|
||||
for ( PluginExecution element : src )
|
||||
{
|
||||
if ( sourceDominant || ( source.isInherited() && element.isInherited() ) )
|
||||
if ( sourceDominant || ( element.getInherited() != null ? element.isInherited() : source.isInherited() ) )
|
||||
{
|
||||
Object key = getPluginExecutionKey( element );
|
||||
merged.put( key, element );
|
||||
|
|
Loading…
Reference in New Issue