mirror of https://github.com/apache/maven.git
[MNG-5155] 'inherited' flag of report sets ignored
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1159625 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
51ec875d17
commit
6262c73a6b
|
@ -550,6 +550,40 @@ public class MavenModelMerger
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mergeReportPlugin_ReportSets( ReportPlugin target, ReportPlugin source, boolean sourceDominant,
|
||||
Map<Object, Object> context )
|
||||
{
|
||||
List<ReportSet> src = source.getReportSets();
|
||||
if ( !src.isEmpty() )
|
||||
{
|
||||
List<ReportSet> tgt = target.getReportSets();
|
||||
Map<Object, ReportSet> merged = new LinkedHashMap<Object, ReportSet>( ( src.size() + tgt.size() ) * 2 );
|
||||
|
||||
for ( ReportSet element : src )
|
||||
{
|
||||
if ( sourceDominant || ( element.getInherited() != null ? element.isInherited() : source.isInherited() ) )
|
||||
{
|
||||
Object key = getReportSetKey( element );
|
||||
merged.put( key, element );
|
||||
}
|
||||
}
|
||||
|
||||
for ( ReportSet element : tgt )
|
||||
{
|
||||
Object key = getReportSetKey( element );
|
||||
ReportSet existing = merged.get( key );
|
||||
if ( existing != null )
|
||||
{
|
||||
mergeReportSet( element, existing, sourceDominant, context );
|
||||
}
|
||||
merged.put( key, element );
|
||||
}
|
||||
|
||||
target.setReportSets( new ArrayList<ReportSet>( merged.values() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object getDependencyKey( Dependency dependency )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue