@Singleton @Named public class DefaultMavenReportExecutor extends Object implements MavenReportExecutor
This component will build some MavenReportExecution
from MavenReportExecutorRequest
. If a
MavenReport
needs to fork a lifecycle, this fork is executed here. It will ask the core to get some
informations in order to correctly setup MavenReport
.
Note if no version is defined in the report plugin, the version will be searched with
resolvePluginVersion(...)
method:
PluginVersionResolver
to get a fallback version (display a warning as it's not a recommended use).
Following steps are done:
PluginDescriptor
from the MavenPluginManager
(through
MavenPluginManagerHelper.getPluginDescriptor(...)
to protect from core API change)ClassLoader
, with the Site plugin classloader as parent for the report execution. IMPORTS
. Corresponding
artifacts are excluded from the artifact resolution: doxia-site-renderer
, doxia-sink-api
and maven-reporting-api
.MavenPluginManager
(through
MavenPluginManagerHelper.setupPluginRealm(...)
to protect from core API change)MavenPluginManager.getConfiguredMojo(...)
LifecycleExecutor.calculateForkedExecutions(...)
if any forked execution is needed: if yes, execute the forked
execution hereConstructor and Description |
---|
DefaultMavenReportExecutor(org.apache.maven.plugin.MavenPluginManager mavenPluginManager,
MavenPluginManagerHelper mavenPluginManagerHelper,
org.apache.maven.lifecycle.LifecycleExecutor lifecycleExecutor,
org.apache.maven.plugin.version.PluginVersionResolver pluginVersionResolver) |
Modifier and Type | Method and Description |
---|---|
List<MavenReportExecution> |
buildMavenReports(MavenReportExecutorRequest mavenReportExecutorRequest)
Build the
MavenReport s, with associated forked executions if necessary. |
protected List<MavenReportExecution> |
buildReportPlugin(MavenReportExecutorRequest mavenReportExecutorRequest,
org.apache.maven.reporting.exec.ReportPlugin reportPlugin) |
protected String |
resolvePluginVersion(org.apache.maven.reporting.exec.ReportPlugin reportPlugin,
MavenReportExecutorRequest mavenReportExecutorRequest)
Resolve report plugin version.
|
@Inject public DefaultMavenReportExecutor(org.apache.maven.plugin.MavenPluginManager mavenPluginManager, MavenPluginManagerHelper mavenPluginManagerHelper, org.apache.maven.lifecycle.LifecycleExecutor lifecycleExecutor, org.apache.maven.plugin.version.PluginVersionResolver pluginVersionResolver)
public List<MavenReportExecution> buildMavenReports(MavenReportExecutorRequest mavenReportExecutorRequest) throws org.apache.maven.plugin.MojoExecutionException
MavenReportExecutor
MavenReport
s, with associated forked executions if necessary.buildMavenReports
in interface MavenReportExecutor
mavenReportExecutorRequest
- the requestorg.apache.maven.plugin.MojoExecutionException
- on report execution issueprotected List<MavenReportExecution> buildReportPlugin(MavenReportExecutorRequest mavenReportExecutorRequest, org.apache.maven.reporting.exec.ReportPlugin reportPlugin) throws Exception
Exception
protected String resolvePluginVersion(org.apache.maven.reporting.exec.ReportPlugin reportPlugin, MavenReportExecutorRequest mavenReportExecutorRequest) throws org.apache.maven.plugin.version.PluginVersionResolutionException
null
value has been found:
PluginVersionResolver
to get a fallback version and display a warning as it's not a recommended
use.reportPlugin
- the report plugin to resolve the versionmavenReportExecutorRequest
- the current report execution contextorg.apache.maven.plugin.version.PluginVersionResolutionException
- on plugin version resolution issueCopyright © 2002–2024 The Apache Software Foundation. All rights reserved.