mavenmaven-surefire-pluginmaven-compiler-plugin

how to get maven to run all tests but still fail build on compile error


Suppose I have a multi-module maven project. I want to run it in such a way that:


Solution

  • You can use surefire parameter: maven.test.failure.ignore

    mvn test -Dmaven.test.failure.ignore
    

    With this options failing test will not fail build a module and finally whole build will have success result.