Class 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 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.
    • Constructor Detail

      • SiteRunMojo

        public SiteRunMojo()
    • 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)