michael nesterenko michael nesterenko - 7 months ago 48
Java Question

maven skip tests with compilation errors

Are there an option to skip tests with compilation errors? Just ignore them or treat them as failed?


The maven-compiler-plugin is responsible for compiling your tests during the test-compile phase. This plugin is configured to fail the build if any test classes fail to compile. You could experiment with the failOnError configuration. But I doubt you'll get the results you expect. The compilation process stops immediately when it encounters a compilation error. So potentially issue free classes may not have been re-compiled. Therefore there will be no guarantee the .class files you execute during the test phase will be 'up to date' with the corresponding .java source files.