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
Fields Modifier and Type Field Description private java.lang.String
host
The host to execute the HTTP server on.private int
port
The port to execute the HTTP server on.private java.io.File
tempWebappDirectory
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
-
-
Constructor Summary
Constructors Constructor Description SiteRunMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.eclipse.jetty.webapp.WebAppContext
createWebApplication()
void
execute()
private java.io.File
getOutputDirectory(java.util.Locale locale)
void
setPort(int port)
void
setTempWebappDirectory(java.io.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
-
-
-
-
Field Detail
-
tempWebappDirectory
@Parameter(defaultValue="${project.build.directory}/site-webapp") private java.io.File tempWebappDirectory
Where to create the dummy web application.
-
host
@Parameter(property="host", defaultValue="localhost") private java.lang.String host
The host to execute the HTTP server on.
-
port
@Parameter(property="port", defaultValue="8080") private int port
The port to execute the HTTP server on.
-
-
Method Detail
-
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:
Mojo.execute()
-
createWebApplication
private org.eclipse.jetty.webapp.WebAppContext createWebApplication() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getOutputDirectory
private java.io.File getOutputDirectory(java.util.Locale locale)
-
setTempWebappDirectory
public void setTempWebappDirectory(java.io.File tempWebappDirectory)
-
setPort
public void setPort(int port)
-
-