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 org.apache.maven.plugin.MojoExecution |
mojoExecution
The mojo execution
|
protected String |
outputTimestamp
Timestamp for reproducible output archive entries, either formatted as ISO 8601
yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like
SOURCE_DATE_EPOCH). |
protected org.apache.maven.doxia.siterenderer.SiteRenderer |
siteRenderer
Site renderer.
|
reactorProjects, remoteProjectRepositories, repoSession, siteDirectory
i18n, project, 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(File outputDirectory) |
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.SiteModel siteModel,
Locale locale,
Map<String,org.apache.maven.reporting.MavenReport> reportsByOutputName) |
prepareSiteModel
getLocales
getLog, getPluginContext, setLog, setPluginContext
@Component protected org.apache.maven.doxia.siterenderer.SiteRenderer siteRenderer
@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
@Parameter(defaultValue="${mojoExecution}", readonly=true, required=true) protected org.apache.maven.plugin.MojoExecution mojoExecution
@Parameter(defaultValue="${project.build.outputTimestamp}") protected String outputTimestamp
yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like
SOURCE_DATE_EPOCH).@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(File outputDirectory) 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–2024 The Apache Software Foundation. All rights reserved.