Class JettyStartMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="start",
          requiresDependencyResolution=TEST)
    @Execute(phase=VALIDATE)
    public class JettyStartMojo
    extends AbstractUnassembledWebAppMojo

    This goal is similar to the jetty:run goal in that it it starts jetty on an unassembled webapp, EXCEPT that it is designed to be bound to an execution inside your pom. Thus, this goal does NOT run a parallel build cycle, so you must be careful to ensure that you bind it to a phase in which all necessary generated files and classes for the webapp have been created.

    This goal will NOT scan for changes in either the webapp project or any scanTargets or scanTargetPatterns.

    You can configure this goal to run your webapp either in-process with maven, or forked into a new process, or deployed into a jetty distribution.

    • Constructor Detail

      • JettyStartMojo

        public JettyStartMojo()
    • Method Detail

      • startJettyEmbedded

        public void startJettyEmbedded()
                                throws org.apache.maven.plugin.MojoExecutionException
        Starts the webapp - without first compiling the classes - in the same process as maven.
        Specified by:
        startJettyEmbedded in class AbstractWebAppMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • startJettyForked

        public void startJettyForked()
                              throws org.apache.maven.plugin.MojoExecutionException
        Start the webapp in a forked jetty process. Use the jetty:stop goal to terminate.
        Specified by:
        startJettyForked in class AbstractWebAppMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • startJettyHome

        public void startJettyHome()
                            throws org.apache.maven.plugin.MojoExecutionException
        Start the webapp in a forked jetty distribution. Use the jetty:stop goal to terminate
        Specified by:
        startJettyHome in class AbstractWebAppMojo
        Throws:
        org.apache.maven.plugin.MojoExecutionException