Can somebody tell me if it is possible to spawn a process and then kill that process when integration tests have finished running?
I am currently using the ant run plugin to start a grunt connect server and I am using cargo to deploy my rest app to tomcat, this allows me to integration test against the running angular web app which calls rest services.
I almost have everything how I want it but.. when the build has finished the grunt server is still running because I have set keep alive to true.
Ideally when my build finishes I would like to somehow kill the process the for the server.
I came back to this as the final piece I needed to fix to get my multi-module project building and running integration tests against an angular front end and java back end as my build runs in maven.
The final thing to do to kill the node server which is spawned is to use the ant run plugin to kill it (simple really!).
Anyway hopefull this might help someone else in the future: