JettyStop not working?


(David Harrigan) #1

Hi,

Gradle 1.0 Java 1.7u11

I have this:

[jettyRun, jettyStop]*.stopPort = 8081
[jettyRun, jettyStop]*.stopKey = 'w00t'
  test {
    doFirst {
        jettyRun.daemon = true
                                                                                                                                                                                                                       jettyRun.execute()
    }
       doLast {
        jettyStop.execute()
    }
   }

Yet, when I run tests (which complete successfully), I find I’m still left with the daemon process running, i.e.,:

$ lsof -i tcp:8080
 COMMAND
 PID
USER
 FD
 TYPE
DEVICE SIZE/OFF NODE NAME
java
  17176 david
226u
IPv4 1995504
    0t0
TCP *:http-alt (LISTEN)

Perhaps I’m doing something incorrect?


Jetty instances running as daemon cannot be shut down
(Shin Tai) #2

You’re doing it right. I’m guessing you see this when running Gradle in daemon mode.

Take a look at: http://issues.gradle.org/browse/GRADLE-2263

Shin


(David Harrigan) #3

Hi,

Thank you for your reply and the link :slight_smile:

-=david=-


(David Harrigan) #4

Hi,

This workaround works :slight_smile: Thank you again! :slight_smile:

-=david=-