Checkstyle & Maven Tutorial

Step 1: The pom.xml with the checkstyle plugin and properties.

check style

check style

Step 2: The checkstyle files that define the rules.

src/main/resources/checkstyle/myapp-checks.xml

src/main/resources/checkstyle/myapp-suppressions.xml

Step 3: Running via mvn command. This reports any stylying errors.


800+ Java Q&As & tutorials

Top