Runs the PMD static code analyzer and its Copy/Paste Detector (CPD) in a Maven build. The check and cpd-check goals fail the build on rule violations or duplicated code; the pmd and cpd goals, and their aggregate-* variants for multi-module builds, publish the results as site reports.
The plugin needs Maven 3.9.0 or later on Java 8 or later. Each release ships with a default PMD version, which you can override at runtime.
mvn verify
The integration tests under src/it run with the run-its profile:
mvn -Prun-its verify
To build the plugin site locally, including the goal pages:
mvn -Preporting site
Open an issue to discuss larger changes first, then send a pull request from a fork with tests (a unit test or an integration test under src/it) and run mvn -Prun-its verify before you push. See Contributing to Apache Maven and the developer mailing list.