org.apache.maven.plugins.site
Class DefaultMavenReportExecutor
java.lang.Object
org.apache.maven.plugins.site.DefaultMavenReportExecutor
- All Implemented Interfaces:
- MavenReportExecutor
@Component(role=MavenReportExecutor.class)
public class DefaultMavenReportExecutor
- extends java.lang.Object
- implements MavenReportExecutor
This component will build some MavenReportExecution from MavenReportExecutorRequest.
If a MavenReport need 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 search
with method getPluginVersion(ReportPlugin, RepositoryRequest, MavenReportExecutorRequest)
Steps to find a plugin version stop after each step if a non null has been found
- use the one defined in the reportPlugin configuration
- search similar (same groupId and artifactId) mojo in the build/plugins section of the pom
- search similar (same groupId and artifactId) mojo in the build/pluginManagement section of the pom
- ask
PluginVersionResolver to get a version and display a warning as it's not a recommended use
Following steps are done
- get
PluginDescriptor from the MavenPluginManager#getPluginDescriptor(Plugin, RepositoryRequest)
- setup a
ClassLoader with the Mojo Site plugin ClassLoader as parent for the report execution.
You must note some classes are imported from the current Site Mojo ClassRealm see IMPORTS.
The artifact resolution excludes the following artifacts (with using an ExclusionSetFilter :
doxia-site-renderer, doxia-sink-api.
done using MavenPluginManager#setupPluginRealm(PluginDescriptor, org.apache.maven.execution.MavenSession, ClassLoader, List, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
-
setup the mojo using
MavenPluginManager.getConfiguredMojo(Class, org.apache.maven.execution.MavenSession, MojoExecution)
-
verify with
LifecycleExecutor.calculateForkedExecutions(MojoExecution, org.apache.maven.execution.MavenSession)
if any forked execution is needed : if yes executes the forked execution here
- Since:
- 3.0-beta-1
- Author:
- Olivier Lamy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mavenPluginManager
@Requirement
protected org.apache.maven.plugin.MavenPluginManager mavenPluginManager
lifecycleExecutor
@Requirement
protected org.apache.maven.lifecycle.LifecycleExecutor lifecycleExecutor
pluginVersionResolver
@Requirement
protected org.apache.maven.plugin.version.PluginVersionResolver pluginVersionResolver
DefaultMavenReportExecutor
public DefaultMavenReportExecutor()
buildMavenReports
public java.util.List<MavenReportExecution> buildMavenReports(MavenReportExecutorRequest mavenReportExecutorRequest)
throws org.apache.maven.plugin.MojoExecutionException
- Specified by:
buildMavenReports in interface MavenReportExecutor
- Returns:
-
- Throws:
org.apache.maven.plugin.MojoExecutionException
getPluginVersion
protected java.lang.String getPluginVersion(ReportPlugin reportPlugin,
org.apache.maven.artifact.repository.RepositoryRequest repositoryRequest,
MavenReportExecutorRequest mavenReportExecutorRequest)
throws org.apache.maven.plugin.version.PluginVersionResolutionException
- Parameters:
reportPlugin - repositoryRequest - mavenReportExecutorRequest -
- Returns:
- the plugin version
- Throws:
org.apache.maven.plugin.version.PluginVersionResolutionException
Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.