public abstract class AbstractSiteRenderingMojo extends AbstractSiteDescriptorMojo
Modifier and Type | Field and Description |
---|---|
protected File |
generatedSiteDirectory
Directory containing generated documentation in source format (Doxia supported markup).
|
protected org.apache.maven.reporting.exec.MavenReportExecutor |
mavenReportExecutor |
protected org.apache.maven.execution.MavenSession |
mavenSession
The current Maven session.
|
protected List<org.apache.maven.reporting.MavenReport> |
reports
Reports (Maven 2).
|
protected org.apache.maven.doxia.siterenderer.Renderer |
siteRenderer
Site renderer.
|
repositories, siteDirectory
i18n, localRepository, project, reactorProjects, siteTool, skip
Constructor and Description |
---|
AbstractSiteRenderingMojo() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,List<org.apache.maven.reporting.MavenReport>> |
categoriseReports(Collection<org.apache.maven.reporting.MavenReport> reports)
Go through the collection of reports and put each report into a list for the appropriate category.
|
protected void |
checkInputEncoding() |
protected org.apache.maven.doxia.siterenderer.SiteRenderingContext |
createSiteRenderingContext(Locale locale) |
protected String |
getInputEncoding()
Gets the input files encoding.
|
protected String |
getOutputEncoding()
Gets the effective reporting output files encoding.
|
protected List<org.apache.maven.reporting.exec.MavenReportExecution> |
getReports() |
protected Map<String,org.apache.maven.doxia.siterenderer.DocumentRenderer> |
locateDocuments(org.apache.maven.doxia.siterenderer.SiteRenderingContext context,
List<org.apache.maven.reporting.exec.MavenReportExecution> reports,
Locale locale)
Locate every document to be rendered for given locale:
handwritten content, ie Doxia files,
reports,
"Project Information" and "Project Reports" category summaries.
|
protected Map<String,org.apache.maven.reporting.MavenReport> |
locateReports(List<org.apache.maven.reporting.exec.MavenReportExecution> reports,
Map<String,org.apache.maven.doxia.siterenderer.DocumentRenderer> documents,
Locale locale)
Go through the list of reports and process each one like this:
Add the report to a map of reports keyed by filename having the report itself as value
If the report is not yet in the map of documents, add it together with a suitable renderer
|
protected void |
populateReportItems(org.apache.maven.doxia.site.decoration.DecorationModel decorationModel,
Locale locale,
Map<String,org.apache.maven.reporting.MavenReport> reportsByOutputName) |
prepareDecorationModel
getLocales
getLog, getPluginContext, setLog, setPluginContext
@Component protected org.apache.maven.doxia.siterenderer.Renderer siteRenderer
@Parameter(defaultValue="${reports}", required=true, readonly=true) protected List<org.apache.maven.reporting.MavenReport> reports
@Parameter(alias="workingDirectory", defaultValue="${project.build.directory}/generated-site") protected File generatedSiteDirectory
siteDirectory
(ie. one directory per Doxia-source-supported markup types).
todo should we deprecate in favour of reports directly using Doxia Sink API, without this Doxia source
intermediate step?@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession mavenSession
@Component protected org.apache.maven.reporting.exec.MavenReportExecutor mavenReportExecutor
protected String getInputEncoding()
null
.protected String getOutputEncoding()
null
.protected void checkInputEncoding()
protected List<org.apache.maven.reporting.exec.MavenReportExecution> getReports() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected org.apache.maven.doxia.siterenderer.SiteRenderingContext createSiteRenderingContext(Locale locale) throws org.apache.maven.plugin.MojoExecutionException, IOException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
IOException
org.apache.maven.plugin.MojoFailureException
protected Map<String,org.apache.maven.reporting.MavenReport> locateReports(List<org.apache.maven.reporting.exec.MavenReportExecution> reports, Map<String,org.apache.maven.doxia.siterenderer.DocumentRenderer> documents, Locale locale)
reports
- A List of MavenReportsdocuments
- A Map of documents, keyed by filenamelocale
- the Locale the reports are processed for.protected Map<String,List<org.apache.maven.reporting.MavenReport>> categoriseReports(Collection<org.apache.maven.reporting.MavenReport> reports)
reports
- A Collection of MavenReportsprotected Map<String,org.apache.maven.doxia.siterenderer.DocumentRenderer> locateDocuments(org.apache.maven.doxia.siterenderer.SiteRenderingContext context, List<org.apache.maven.reporting.exec.MavenReportExecution> reports, Locale locale) throws IOException, org.apache.maven.doxia.siterenderer.RendererException
context
- the site contextreports
- the documentslocale
- the localeIOException
- in case of file reading issueorg.apache.maven.doxia.siterenderer.RendererException
- in case of Doxia rendering issueCategorySummaryDocumentRenderer
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.