Violation Checking

The pmd:check and pmd:cpd-check goals allow you to configure your build to fail if any errors are found in the PMD or CPD reports respectively. In doing so you can enforce your own custom code quality rules.

The rule violations may optionally be displayed on the build output using the verbose setting.

The following code fragment enables both the standard PMD check and the CPD check in a build, during the verify phase.