I'm currently using the maven plugin exec-maven-plugin
to execute a script, this script launches several java programs corresponding to an integration test
, if the test passes, everything is stopped properly by a cleanup script
executed later in the build.
My problem is when the test fails because when the plugin exec-maven-plugin
fails it stops the build immediately such that my cleanup script
is never called which means that my java programs are never stopped.
So is there a way to execute my cleanup script
even if my integration test
fails?
So far, I added 1
as successCode
to my integration test to ensure that my cleanup script
is called but it is not good enough because the build is seen has a build success which is not the case.
Any ideas?