棘尾不能优雅地退出 [英] Thorntail not exiting gracefully
问题描述
我正在使用以下任一命令在Maven中运行Thorntail 2.2.1.Final微服务
I'm running a Thorntail 2.2.1.Final microservice with Maven using either of these commands
mvn thorntail:start
mvn thorntail:run
它运行正常,但是当我按下Ctrl-C
时,该应用程序不存在,即控制台返回,但该应用程序在后台运行.我试图阻止它
It runs fine, but when I hit Ctrl-C
it doesn't exist the application i.e. the console returns, but the app runs in the background. I've tried to stop it
mvn thorntail:stop
但这不起作用.我必须去消灭这个过程.我正在使用Windows 10.
But that doesn't work. I have to go and kill the process. I'm using Windows 10.
推荐答案
thorntail:start
和thorntail:stop
目标旨在作为Maven生命周期的一部分一起使用,通常用于集成测试.也就是说,thorntail:start
有意让进程在后台运行,而thorntail:stop
应该将其停止.
The thorntail:start
and thorntail:stop
goals are meant to be used together as part of a Maven lifecycle, typically for integration testing. That is, thorntail:start
intentionally leaves the process running in the background, and thorntail:stop
should stop it.
对于交互式使用,应使用mvn thorntail:run
.那一直在前台等待,而Ctrl + C应该将应用程序停止在它后面.
For interactive use, mvn thorntail:run
should be used. That keeps waiting in the foreground, and Ctrl+C should stop the application behind it.
如果这些都不起作用,那就是一个错误.我建议在 https://issues.jboss.org/browse/THORN 中提交错误.并且最好还包括该过程的jstack
输出.
If none of that works, it's a bug. I'd recommend filing a bug in https://issues.jboss.org/browse/THORN and preferrably also include a jstack
output for the process.
这篇关于棘尾不能优雅地退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!