Maven 2 Checkstyle Plugin

The Checkstyle plugin generates report regarding the code style used by the developers. For more information about Checkstyle, see http://checkstyle.sourceforge.net/

The plugin can be configured in the project's pom. Predefined rulesets are included with the plugin, these are: sun_checks.xml , turbine_checks.xml , avalon_checks.xml and maven_checks.xml . You can also use a custom ruleset by specifying it in the plugin configuration.

Goals Overview

The Checkstyle Plugin has two goals:

  • checkstyle:checkstyle performs Checkstyle analysis and generates a report on violations.
  • checkstyle:check performs a violation check against the last Checkstyle run to see if there are any violations. It reads the Checkstyle output file, counts the number of violations found and displays it on the console.

Usage

Instructions on how to use the Checkstyle Plugin can be found here .