Hello I want to make my build fail if there are any checkstyle errors in my code. I have added the following to my pom:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> <failOnViolation>true</failOnViolation> </configuration> </plugin> </plugins> </build> When I execute mvn checkstyle:check my build fails when I have a checkstyle error. When I execute mvn install the build does not fail. Reading the plugin pages I expected my build to fail for the intall goal as well, what else do I need to add to the POM to make the build fail? I am running Maven 2.0.5. Thanks Andrew