Apache

Docs Plugins

PMD Plugin 3.28.0 · Other versions

A Maven plugin for the PMD toolkit, that produces a report on both code rule violations and detected copy and paste fragments, as well as being able to fail the build based on these metrics.

Source
Edit this page
Wrong?
Report a problem

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.28.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>