mirror of https://github.com/apache/maven.git
Add a check on objects return by DefaultPluginManager.getReports for MNG-530
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@202142 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17e3c742ee
commit
504e281d0e
|
@ -765,11 +765,17 @@ public class DoxiaMojo
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List reportSets = reportPlugin.getReportSets();
|
List reportSets = reportPlugin.getReportSets();
|
||||||
|
|
||||||
|
List reportsList = new ArrayList();
|
||||||
|
|
||||||
if ( reportSets == null || reportSets.isEmpty() )
|
if ( reportSets == null || reportSets.isEmpty() )
|
||||||
{
|
{
|
||||||
reports.addAll(
|
reportsList = pluginManager.getReports( reportPlugin.getGroupId(),
|
||||||
pluginManager.getReports( reportPlugin.getGroupId(), reportPlugin.getArtifactId(),
|
reportPlugin.getArtifactId(),
|
||||||
reportPlugin.getVersion(), null, session, project ) );
|
reportPlugin.getVersion(),
|
||||||
|
null,
|
||||||
|
session,
|
||||||
|
project );
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -778,9 +784,23 @@ public class DoxiaMojo
|
||||||
{
|
{
|
||||||
ReportSet reportSet = (ReportSet) j.next();
|
ReportSet reportSet = (ReportSet) j.next();
|
||||||
|
|
||||||
reports.addAll(
|
reportsList = pluginManager.getReports( reportPlugin.getGroupId(),
|
||||||
pluginManager.getReports( reportPlugin.getGroupId(), reportPlugin.getArtifactId(),
|
reportPlugin.getArtifactId(),
|
||||||
reportPlugin.getVersion(), reportSet, session, project ) );
|
reportPlugin.getVersion(),
|
||||||
|
reportSet,
|
||||||
|
session,
|
||||||
|
project );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( Iterator i = reportsList.iterator(); i.hasNext(); )
|
||||||
|
{
|
||||||
|
Object obj = i.next();
|
||||||
|
|
||||||
|
//TODO: Remove this test when getReports will return only reports object
|
||||||
|
if ( obj instanceof MavenReport )
|
||||||
|
{
|
||||||
|
reports.add( obj );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue