maven-checkstyle-plugin

Generates a report on violations of code style and optionally fails the build if violations are detected.