Is there a possibility to somehow force maven to fail the build if there are some checkstyle errors? Now I have to run site goal to generate java
checkstyle
site
java
You need to bind checkstyle:check to a Maven lifecycle phase (e.g. validate ) and set failOnViolation to true.
checkstyle:check
failOnViolation
Something like:
org.apache.maven.plugins maven-checkstyle-plugin 2.9.1 checkstyle validate check true