try something like this.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins<groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
by default the check goal is link to verify phase
CletteBou
2007/6/21, Andrew Moores <[EMAIL PROTECTED]>:
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