当前位置: 动力学知识库 > 问答 > 编程问答 >

java - gradle jetty plugin does not stop when using daemon=true in jettyRun

问题描述:

I'm using the following gradle script for very simple web application:

apply plugin: 'war'

apply plugin: 'jetty'

repositories {

mavenCentral()

}

dependencies {

providedCompile deps['servlet-api']

providedCompile deps['commons-io']

providedCompile deps['gson']

}

jettyRun {

contextPath = "/"

httpPort = 8900

stopPort = 9800

stopKey = "pleaseStop"

daemon = true

}

jettyStop {

stopPort = 9800

stopKey = "pleaseStop"

}

When I run jettyRun the app works but when I run jettyStop it does not stop.

If I change daemon to false jettyStop does stop the embedded Jetty server.

How can I stop the embedded Jetty server when use in daemon mode?

分享给朋友:
您可能感兴趣的文章:
随机阅读: