I am running my Rest based Java service on Jetty server using jetty-maven-plugin version 9.3.12.v20160915.
I want to be able to perform a graceful shutdown of my service, i.e. all running threads in the Java service must be thrown with Java InterruptedException. I have already written my code assuming the above in mind.
When I try using mvn jetty:stop, it stops my service but does not do a graceful shutdown. All threads are immediately killed (without doing the clean up I wanted it do in finally block of my code that would have got executed in case InterruptedException would have been thrown by jetty:stop command).
Is there a way to achieve graceful shutdown with jetty mvn plugin ?