Class SiteRunMojo
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.run.SiteRunMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="run",
requiresDependencyResolution=TEST,
requiresReports=true)
public class SiteRunMojo
extends AbstractSiteRenderingMojo
Starts the site up, rendering documents as requested for faster editing.
It uses Jetty as the web server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe host to execute the HTTP server on.private intThe port to execute the HTTP server on.private FileWhere to create the dummy web application.Fields inherited from class org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.eclipse.jetty.webapp.WebAppContextvoidexecute()private FilegetOutputDirectory(Locale locale) voidsetPort(int port) voidsetTempWebappDirectory(File tempWebappDirectory) 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
-
tempWebappDirectory
Where to create the dummy web application. -
host
The host to execute the HTTP server on. -
port
@Parameter(property="port", defaultValue="8080") private int portThe port to execute the HTTP server on.
-
-
Constructor Details
-
SiteRunMojo
public SiteRunMojo()
-
-
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- See Also:
-
createWebApplication
private org.eclipse.jetty.webapp.WebAppContext createWebApplication() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getOutputDirectory
-
setTempWebappDirectory
-
setPort
public void setPort(int port)
-