if ( mojoDescriptor == null )
{
throw new MojoNotFoundException( goal, pluginDescriptor );
}
MojoExecution mojoExecution = new MojoExecution( plugin, goal, "report:" + goal );
mojoExecution.setConfiguration( convert( mojoDescriptor ) );
mojoExecution.setMojoDescriptor( mojoDescriptor );
mavenPluginManager.setupPluginRealm( pluginDescriptor,
mavenReportExecutorRequest.getMavenSession(),
Thread.currentThread().getContextClassLoader(), imports, exclusionSetFilter );
MavenReport mavenReport =
getConfiguredMavenReport( mojoExecution, pluginDescriptor, mavenReportExecutorRequest );
if ( mavenReport == null )
{
continue;
}
if ( reportPlugin.getConfiguration() != null )
{
Xpp3Dom mergedConfiguration =
Xpp3DomUtils.mergeXpp3Dom( (Xpp3Dom) reportPlugin.getConfiguration(),
convert( mojoDescriptor ) );
Xpp3Dom cleanedConfiguration = new Xpp3Dom( "configuration" );
if ( mergedConfiguration.getChildren() != null )
{
for ( int i = 0, size = mergedConfiguration.getChildren().length; i < size; i++ )
{
if ( mojoDescriptor.getParameterMap().containsKey(
mergedConfiguration.getChildren()[i].getName() ) )
{
cleanedConfiguration.addChild( mergedConfiguration.getChildren()[i] );
}
}
}
if ( getLog().isDebugEnabled() )
{
getLog().debug( "mojoExecution mergedConfiguration " + mergedConfiguration );
getLog().debug( "mojoExecution cleanedConfiguration " + cleanedConfiguration );
}
mojoExecution.setConfiguration( cleanedConfiguration );
}
mavenReport =
getConfiguredMavenReport( mojoExecution, pluginDescriptor, mavenReportExecutorRequest );
if ( mavenReport != null )
{
MavenReportExecution mavenReportExecution =
new MavenReportExecution( mavenReport, pluginDescriptor.getClassRealm() );
lifecycleExecutor.calculateForkedExecutions( mojoExecution,
mavenReportExecutorRequest.getMavenSession() );
if ( !mojoExecution.getForkedExecutions().isEmpty() )
{
lifecycleExecutor.executeForkedExecutions( mojoExecution,
mavenReportExecutorRequest.getMavenSession() );
}
if ( canGenerateReport( mavenReport ) )