Class JettyStopMojo

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

    @Mojo(name="stop")
    public class JettyStopMojo
    extends org.apache.maven.plugin.AbstractMojo
    This goal stops a running instance of jetty. The stopPort and stopKey parameters can be used to configure which jetty to stop. Stops jetty that is configured with <stopKey> and <stopPort>.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String stopKey
      Key to provide when stopping jetty on executing java -DSTOP.KEY=<stopKey> -DSTOP.PORT=<stopPort> -jar start.jar --stop
      protected int stopPort
      Port to listen to stop jetty on sending stop command
      protected int stopWait
      Max time in seconds that the plugin will wait for confirmation that jetty has stopped.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      JettyStopMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      java.lang.String getStopKey()  
      int getStopPort()  
      void setStopKey​(java.lang.String stopKey)  
      void setStopPort​(int stopPort)  
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • stopPort

        @Parameter(required=true)
        protected int stopPort
        Port to listen to stop jetty on sending stop command
      • stopKey

        @Parameter(required=true)
        protected java.lang.String stopKey
        Key to provide when stopping jetty on executing java -DSTOP.KEY=<stopKey> -DSTOP.PORT=<stopPort> -jar start.jar --stop
      • stopWait

        @Parameter
        protected int stopWait
        Max time in seconds that the plugin will wait for confirmation that jetty has stopped.
    • Constructor Detail

      • JettyStopMojo

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

        public int getStopPort()
      • setStopPort

        public void setStopPort​(int stopPort)
      • getStopKey

        public java.lang.String getStopKey()
      • setStopKey

        public void setStopKey​(java.lang.String stopKey)