Class AutoRefreshMojo

All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="auto-refresh", requiresDependencyResolution=TEST, threadSafe=true, aggregator=true) public class AutoRefreshMojo extends AbstractSiteRenderingMojo
Renders the site once completely and then watches for Doxia source file changes. After modifications the affected file(s) are re-rendered and the output files updated. The goal blocks until the user presses Enter.

This is intended for use during site development to provide immediate feedback on changes. It only works on a single project and does neither consider child projects nor site staging.

Since:
3.22.0
  • 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/...).
  • Constructor Details

    • AutoRefreshMojo

      @Inject public AutoRefreshMojo(org.apache.maven.doxia.site.inheritance.SiteModelInheritanceAssembler assembler, org.apache.maven.doxia.siterenderer.SiteRenderer siteRenderer, org.apache.maven.reporting.exec.MavenReportExecutor mavenReportExecutor, org.codehaus.plexus.components.interactivity.Prompter prompter)
  • 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