How can the Maven Failsafe plug-in be made to exit with a non-zero exit status if any test fails? By default it seems to exit with a zero exit status no matter if tests succeeded or failed.
This is a problem when running integration tests from an editor (like Emacs) that checks the exit status of the build command: If it sees a zero exit status, it assumes executing the tests succeeded. If it sees a non-zero exit status, it flags that visibly to the user. This cannot be used if Maven Failsafe always just exits with a zero exit status and the user is forced to review the test execution logs to discover if tests failed, which is a time-consuming task.
The command used is: mvn test-compile failsafe:integration-test -Dit.test=FooIT