public abstract class AbstractSiteRenderingMojo extends AbstractSiteDescriptorMojo implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Modifier and Type | Field and Description |
---|---|
protected File |
generatedSiteDirectory
Directory containing generated documentation in source format (Doxia supported markup).
|
protected MavenSession |
mavenSession
The current Maven session.
|
protected List<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<MavenReport>> |
categoriseReports(Collection<MavenReport> reports)
Go through the collection of reports and put each report into a list for the appropriate category.
|
protected void |
checkInputEncoding() |
void |
contextualize(org.codehaus.plexus.context.Context context) |
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,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,MavenReport> reportsByOutputName) |
prepareDecorationModel
getLocales, getMavenVersion, isMaven3OrMore
getLog, getPluginContext, setLog, setPluginContext
@Component protected org.apache.maven.doxia.siterenderer.Renderer siteRenderer
@Parameter(defaultValue="${reports}", required=true, readonly=true) protected List<MavenReport> reports
@Parameter(alias="workingDirectory", defaultValue="${project.build.directory}/generated-site") protected File generatedSiteDirectory
siteDirectory
(ie. one directory per Doxia-source-supported markup types).@Parameter(defaultValue="${session}", readonly=true, required=true) protected MavenSession mavenSession
protected String getInputEncoding()
null
.protected String getOutputEncoding()
null
.public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
contextualize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
org.codehaus.plexus.context.ContextException
protected void checkInputEncoding()
protected List<org.apache.maven.reporting.exec.MavenReportExecution> getReports() throws MojoExecutionException
MojoExecutionException
protected org.apache.maven.doxia.siterenderer.SiteRenderingContext createSiteRenderingContext(Locale locale) throws MojoExecutionException, IOException, MojoFailureException
protected Map<String,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<MavenReport>> categoriseReports(Collection<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
protected void populateReportItems(org.apache.maven.doxia.site.decoration.DecorationModel decorationModel, Locale locale, Map<String,MavenReport> reportsByOutputName)
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.