if ( mojoDescriptor == null )
{
throw new MojoNotFoundException( report.getGoal(), pluginDescriptor );
}
MojoExecution mojoExecution = new MojoExecution( plugin, report.getGoal(), "report:" + report.getGoal() );
mojoExecution.setMojoDescriptor( mojoDescriptor );
mavenPluginManagerHelper.setupPluginRealm( pluginDescriptor, mavenReportExecutorRequest.getMavenSession(),
Thread.currentThread().getContextClassLoader(), IMPORTS,
EXCLUDES );
if ( !isMavenReport( mojoExecution, pluginDescriptor ) )
{
if ( userDefinedReports )
{
// reports were explicitly written in the POM
logger.warn( "ignoring " + mojoExecution.getPlugin().getId() + ':' + report.getGoal()
+ " goal since it is not a report: should be removed from reporting configuration in POM" );
}
continue;
}
mojoExecution.setConfiguration( mergeConfiguration( mojoDescriptor.getMojoConfiguration(),
reportPlugin.getConfiguration(),
report.getConfiguration(),
mojoDescriptor.getParameterMap().keySet() ) );
MavenReport mavenReport =
getConfiguredMavenReport( mojoExecution, pluginDescriptor, mavenReportExecutorRequest );
MavenReportExecution mavenReportExecution =
new MavenReportExecution( mojoExecution.getPlugin(), mavenReport, pluginDescriptor.getClassRealm() );
lifecycleExecutor.calculateForkedExecutions( mojoExecution, mavenReportExecutorRequest.getMavenSession() );
if ( !mojoExecution.getForkedExecutions().isEmpty() )
{
lifecycleExecutor.executeForkedExecutions( mojoExecution, mavenReportExecutorRequest.getMavenSession() );
}
if ( canGenerateReport( mavenReport, mojoExecution ) )