Those are two different plugins. maven-compiler-plugin, as its name suggests, handles compiling your code. maven-surefire-plugin handles [unit] test execution and failing the build process if there are test failures.
Those are two different plugins. maven-compiler-plugin, as its name suggests, handles compiling your code. maven-surefire-plugin handles [unit] test execution and failing the build process if there are test failures.