I'm trying to properly shutdown a datasource using a DataSourceCloser while running jetty under maven. When I Ctrl-C, I see that the servlets are propertly destroyed but not the various Destroyables I have registered (the method Destroyable.destroy() is never called).
My maven settings are very simple, <webAppXml> points to a file like:
I never run jetty outside maven so I can't be sure this is a problem strictly related to maven.
The reason I need the datasources to be properly destroyed is that my project has 2 webapp modules and when I do a full build with integration tests, the datasource of the first webapp will never be closed and will be reused by the second and my tests will fail.