Class PluginReport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.reporting.AbstractMavenReport
org.apache.maven.plugin.plugin.report.PluginReport
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.apache.maven.reporting.MavenMultiPageReport, org.apache.maven.reporting.MavenReport
- Direct Known Subclasses:
PluginNoForkReport
@Mojo(name="report",
threadSafe=true)
@Execute(phase=PROCESS_CLASSES)
public class PluginReport
extends org.apache.maven.reporting.AbstractMavenReport
Generates the plugin's report: the plugin details page at
plugin-info.html
and one goal-mojo.html per goal.
Relies on one output file from plugin:descriptor.- Since:
- 3.7.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIn case the internal javadoc site has not been generated when running this report goal (e.g.private FilePath to enhanced plugin descriptor to generate the report from (must contain some XHTML values)private booleanSet this to "true" to generate the usage section for "plugin-info.html" with<extensions>true</extensions>.private final org.codehaus.plexus.i18n.I18NInternationalization component.private final org.apache.maven.execution.MavenSessionprivate final org.apache.maven.project.ProjectBuilderprivate final org.eclipse.aether.RepositorySystemprivate List<RequirementsHistory> The Plugin requirements history list.private StringPlugin's version range for automatic detection of requirements history.private final org.apache.maven.rtinfo.RuntimeInformationprivate booleanSet this to "true" to skip generating the report.Fields inherited from class org.apache.maven.reporting.AbstractMavenReport
locale, mojoExecution, outputDirectory, outputFormat, outputTimestamp, project, reactorProjects, remoteProjectRepositories, repoSession, siteDirectory, siteRenderer, siteToolFields inherited from interface org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLEFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionPluginReport(org.apache.maven.rtinfo.RuntimeInformation rtInfo, org.codehaus.plexus.i18n.I18N i18n, org.apache.maven.execution.MavenSession mavenSession, org.eclipse.aether.RepositorySystem repositorySystem, org.apache.maven.project.ProjectBuilder projectBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.maven.project.MavenProjectbuildMavenProject(String version) booleanprivate List<org.eclipse.aether.version.Version> discoverVersions(String range) protected voidexecuteReport(Locale locale) private org.apache.maven.plugin.descriptor.PluginDescriptorprivate voidgenerateMojosDocumentation(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor, Locale locale) Generate the mojos' documentation with theAbstractMavenReport.getSinkFactory()getDescription(Locale locale) private StringgetI18nString(Locale locale, String key) Methods inherited from class org.apache.maven.reporting.AbstractMavenReport
closeReport, constructXrefLocation, execute, generate, generate, getCategoryName, getInputEncoding, getLocale, getOutputDirectory, getOutputEncoding, getProject, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, getXrefLocation, isExternalReport, setReportOutputDirectoryMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.reporting.MavenReport
getOutputPath
-
Field Details
-
skip
@Parameter(defaultValue="false", property="maven.plugin.report.skip") private boolean skipSet this to "true" to skip generating the report.- Since:
- 3.7.0
-
hasExtensionsToLoad
@Parameter(defaultValue="false", property="maven.plugin.report.hasExtensionsToLoad") private boolean hasExtensionsToLoadSet this to "true" to generate the usage section for "plugin-info.html" with<extensions>true</extensions>.- Since:
- 3.7.0
-
requirementsHistories
The Plugin requirements history list.Can be specified as list of
requirementsHistory:<requirementsHistories> <requirementsHistory> <version>plugin version</version> <maven>maven version</maven> <jdk>jdk version</jdk> </requirementsHistory> </requirementsHistories>- Since:
- 3.7.0
-
requirementsHistoryDetectionRange
Plugin's version range for automatic detection of requirements history.- Since:
- 3.12.0
-
rtInfo
private final org.apache.maven.rtinfo.RuntimeInformation rtInfo -
i18n
private final org.codehaus.plexus.i18n.I18N i18nInternationalization component. -
enhancedPluginXmlFile
@Parameter(defaultValue="${project.build.directory}/plugin-enhanced.xml", required=true, readonly=true) private File enhancedPluginXmlFilePath to enhanced plugin descriptor to generate the report from (must contain some XHTML values)- Since:
- 3.7.0
-
disableInternalJavadocLinkValidation
@Parameter(property="maven.plugin.report.disableInternalJavadocLinkValidation") private boolean disableInternalJavadocLinkValidationIn case the internal javadoc site has not been generated when running this report goal (e.g. when using an aggregator javadoc report) link validation needs to be disabled by setting this value totrue. This might have the drawback that some links being generated in the report might be broken in case not all parameter types and javadoc link references are resolvable through the sites being given to goalplugin:descriptor.- Since:
- 3.7.0
-
mavenSession
private final org.apache.maven.execution.MavenSession mavenSession -
repositorySystem
private final org.eclipse.aether.RepositorySystem repositorySystem -
projectBuilder
private final org.apache.maven.project.ProjectBuilder projectBuilder
-
-
Constructor Details
-
PluginReport
@Inject public PluginReport(org.apache.maven.rtinfo.RuntimeInformation rtInfo, org.codehaus.plexus.i18n.I18N i18n, org.apache.maven.execution.MavenSession mavenSession, org.eclipse.aether.RepositorySystem repositorySystem, org.apache.maven.project.ProjectBuilder projectBuilder)
-
-
Method Details
-
canGenerateReport
public boolean canGenerateReport()- Specified by:
canGenerateReportin interfaceorg.apache.maven.reporting.MavenReport- Overrides:
canGenerateReportin classorg.apache.maven.reporting.AbstractMavenReport
-
executeReport
- Specified by:
executeReportin classorg.apache.maven.reporting.AbstractMavenReport- Throws:
org.apache.maven.reporting.MavenReportException
-
extractPluginDescriptor
private org.apache.maven.plugin.descriptor.PluginDescriptor extractPluginDescriptor() throws org.apache.maven.reporting.MavenReportException- Throws:
org.apache.maven.reporting.MavenReportException
-
getI18nString
-
getName
-
getDescription
-
getOutputName
-
generateMojosDocumentation
private void generateMojosDocumentation(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor, Locale locale) throws org.apache.maven.reporting.MavenReportException Generate the mojos' documentation with theAbstractMavenReport.getSinkFactory()- Parameters:
pluginDescriptor- not nulllocale- not null- Throws:
org.apache.maven.reporting.MavenReportException- if anyIOException
-
discoverVersions
-
buildMavenProject
private org.apache.maven.project.MavenProject buildMavenProject(String version) throws org.apache.maven.project.ProjectBuildingException - Throws:
org.apache.maven.project.ProjectBuildingException
-