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 String
The host to execute the HTTP server on.private int
The port to execute the HTTP server on.private File
Where to create the dummy web application.Fields inherited from class org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo
generatedSiteDirectory, mavenReportExecutor, mavenSession, mojoExecution, outputTimestamp, siteRenderer
Fields inherited from class org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
reactorProjects, remoteProjectRepositories, repoSession, siteDirectory
Fields inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
i18n, project, siteTool, skip
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.eclipse.jetty.webapp.WebAppContext
void
execute()
private File
getOutputDirectory
(Locale locale) void
setPort
(int port) void
setTempWebappDirectory
(File tempWebappDirectory) Methods inherited from class org.apache.maven.plugins.site.render.AbstractSiteRenderingMojo
categoriseReports, checkInputEncoding, createSiteRenderingContext, getInputEncoding, getOutputEncoding, getReports, locateDocuments, locateReports, populateReportItems
Methods inherited from class org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
prepareSiteModel
Methods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
getLocales
Methods 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.MojoExecutionException
org.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)
-