Remove Report
You may want to generate only one of the reports, but not the other. Since version 3.15.0 separate aggregate reports have been added, which would duplicate the reports. To select only the reports you want you can use the <reportSets>
feature within your POM. Below is the default configuration for the plugin. To disable one of the reports, just copy the <reportSets>
element below to your POM and remove the <report>
you don't want to generate.
<project> ... <reporting> <plugins> <plugin> <artifactId>maven-pmd-plugin</artifactId> <version>3.25.0</version> <reportSets> <reportSet> <reports> <report>pmd</report> <report>cpd</report> <report>aggregate-pmd</report> <report>aggregate-pmd-no-fork</report> <report>aggregate-cpd</report> </reports> </reportSet> </reportSets> </plugin> </plugins> </reporting> ... </project>