Class AutoRefreshMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.site.AbstractSiteMojo
org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo
org.apache.maven.plugins.site.render.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 Summary
FieldsModifier and TypeFieldDescriptionprotected FileDirectory where the project sites and report distributions will be generated (as html/css/...).Fields inherited from class org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo
alternativeSiteSourceDirectories, generatedSiteDirectory, mavenReportExecutor, mavenSession, mojoExecution, outputTimestamp, siteRendererFields inherited from class org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
reactorProjects, remoteProjectRepositories, repoSession, siteDirectoryFields inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
i18n, project, siteTool, skipFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionAutoRefreshMojo(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 Summary
Methods inherited from class org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo
categoriseReports, checkInputEncoding, createSiteRenderingContext, getInputEncoding, getOutputEncoding, getReports, locateDocuments, locateReports, populateReportItemsMethods inherited from class org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
prepareSiteModelMethods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
getLocalesMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
outputDirectory
@Parameter(property="siteOutputDirectory", defaultValue="${project.reporting.outputDirectory}") protected File outputDirectoryDirectory 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.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-