Class SiteMojo

All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
SiteJarMojo

@Mojo(name="site", requiresDependencyResolution=TEST, requiresReports=true, threadSafe=true) public class SiteMojo extends AbstractSiteRenderingMojo
Generates the site for a single project.

Note that links between module sites in a multi module build will not work, since local build directory structure doesn't match deployed site.

  • Field Details

    • outputDirectory

      @Parameter(property="siteOutputDirectory", defaultValue="${project.reporting.outputDirectory}") protected File outputDirectory
      Directory where the project sites and report distributions will be generated (as html/css/...).
    • generateReports

      @Parameter(property="generateReports", defaultValue="true") private boolean generateReports
      Convenience parameter that allows you to disable report generation.
    • validate

      @Parameter(property="validate", defaultValue="false") private boolean validate
      Whether to validate xml input documents. If set to true, all input documents in xml format (in particular xdoc and fml) will be validated and any error will lead to a build failure.
      Since:
      2.1.1
  • Constructor Details

    • SiteMojo

      public SiteMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • renderLocale

      private void renderLocale(Locale locale, List<org.apache.maven.reporting.exec.MavenReportExecution> reports, List<Locale> supportedLocales, File outputDirectory) throws IOException, org.apache.maven.doxia.siterenderer.RendererException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
      Throws:
      IOException
      org.apache.maven.doxia.siterenderer.RendererException
      org.apache.maven.plugin.MojoFailureException
      org.apache.maven.plugin.MojoExecutionException
    • renderDoxiaDocuments

      private List<org.apache.maven.doxia.siterenderer.DocumentRenderer> renderDoxiaDocuments(Collection<org.apache.maven.doxia.siterenderer.DocumentRenderer> documents, org.apache.maven.doxia.siterenderer.SiteRenderingContext context, File outputDirectory) throws org.apache.maven.doxia.siterenderer.RendererException, IOException
      Render Doxia documents from the list given, but not reports.
      Parameters:
      documents - a collection of documents containing both Doxia source files and reports
      Returns:
      the sublist of documents that are not Doxia source files
      Throws:
      org.apache.maven.doxia.siterenderer.RendererException
      IOException
    • renderNonDoxiaDocuments

      private void renderNonDoxiaDocuments(Collection<org.apache.maven.doxia.siterenderer.DocumentRenderer> documents, org.apache.maven.doxia.siterenderer.SiteRenderingContext context, File outputDirectory) throws org.apache.maven.doxia.siterenderer.RendererException, IOException
      Render non-Doxia documents (e.g., reports) from the list given
      Parameters:
      documents - a collection of documents containing non-Doxia source files
      Throws:
      org.apache.maven.doxia.siterenderer.RendererException
      IOException
    • getOutputDirectory

      private File getOutputDirectory(Locale locale)
    • getProject

      public org.apache.maven.project.MavenProject getProject()
    • getSession

      public org.apache.maven.execution.MavenSession getSession()