Class JettyRunWarMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    JettyDeployWar

    @Mojo(name="run-war",
          requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
    @Execute(phase=PACKAGE)
    public class JettyRunWarMojo
    extends AbstractJettyMojo

    This goal is used to assemble your webapp into a war and automatically deploy it to Jetty.

    Once invoked, the plugin runs continuously and can be configured to scan for changes in the project and to the war file and automatically perform a hot redeploy when necessary.

    You may also specify the location of a jetty.xml file whose contents will be applied before any plugin configuration. This can be used, for example, to deploy a static webapp that is not part of your maven build.

    Runs jetty on a war file
    • Constructor Detail

      • JettyRunWarMojo

        public JettyRunWarMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Specified by:
        execute in interface org.apache.maven.plugin.Mojo
        Overrides:
        execute in class AbstractJettyMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
        See Also:
        Mojo.execute()
      • configureWebApplication

        public void configureWebApplication()
                                     throws java.lang.Exception
        Description copied from class: AbstractJettyMojo
        Subclasses should invoke this to setup basic info on the webapp
        Overrides:
        configureWebApplication in class AbstractJettyMojo
        Throws:
        java.lang.Exception - if unable to configure web application