Skip to content

Checkstyle plugin

Anton Antonenko edited this page Sep 16, 2016 · 5 revisions

Checkstyle plugin

Enabling

To enable checkstyle for module add following code to pom.xml in section <plugins></plugins>:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>

If you need report being generated without failing a build add:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<failOnViolation>false</failOnViolation>
<failsOnError>false</failsOnError>
</configuration>
</plugin>

Report

Checkstyle generates a report which can be found in the ./your_module_name/target/checkstyle directory.