Jetty plugin, stopKey not working in daemon mode


(Nikita Salnikov-Tarnovski) #1

If I am reading it right, org.gradle.api.plugins.jetty.AbstractJettyRunTask has the following code:

// start Jetty
            server.start();
              if (daemon) {
                return;
            }
              if (getStopPort() != null && getStopPort() > 0 && getStopKey() != null) {
                Monitor monitor = new Monitor(getStopPort(), getStopKey(), (Server) server.getProxiedObject());
                monitor.start();
            }

For this means that Monitor for listening for jettyStop task is only started, when daemon mode is false? Is it indeed the desired behaviour? I would think that ability to stop Jetty server via socket connect is needed exactly for daemon mode case?


Jetty plugin jettyStop in daemon mode