[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:
Benjamin Bentmann 2011-08-19 13:17:41 +00:00
parent 51ec875d17
commit 6262c73a6b
1 changed files with 34 additions and 0 deletions

View File

@ -550,6 +550,40 @@ protected void mergePluginExecution_Goals( PluginExecution target, PluginExecuti
}
}
@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 )
{