Class AbstractPmdReport

All Implemented Interfaces:
ContextEnabled, Mojo, MavenMultiPageReport, MavenReport
Direct Known Subclasses:
CpdReport, PmdReport

public abstract class AbstractPmdReport extends AbstractMavenReport
Base class for the PMD reports.
Version:
$Id$
Author:
Brett Porter
  • Field Details

    • targetDirectory

      @Parameter(property="project.build.directory", required=true) protected File targetDirectory
      The output directory for the intermediate XML report.
    • outputDirectory

      @Parameter(property="project.reporting.outputDirectory", required=true) protected File outputDirectory
      The output directory for the final HTML report. Note that this parameter is only evaluated if the goal is run directly from the command line or during the default lifecycle. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.
    • format

      @Parameter(property="format", defaultValue="xml") protected String format
      Set the output format type, in addition to the HTML report. Must be one of: "none", "csv", "xml", "txt" or the full class name of the PMD renderer to use. See the net.sourceforge.pmd.renderers package javadoc for available renderers. XML is produced in any case, since this format is needed for the check goals (pmd:check, pmd:aggregator-check, pmd:cpd-check, pmd:aggregator-cpd-check).
    • includeTests

      @Parameter(defaultValue="false") protected boolean includeTests
      Run PMD on the tests.
      Since:
      2.2
    • aggregate

      @Parameter(property="aggregate", defaultValue="false") @Deprecated protected boolean aggregate
      Deprecated.
      since 3.15.0 Use the goals pmd:aggregate-pmd and pmd:aggregate-cpd instead.
      Whether to build an aggregated report at the root, or build individual reports.
      Since:
      2.2
    • includeXmlInSite

      @Parameter(defaultValue="false") protected boolean includeXmlInSite
      Whether to include the xml files generated by PMD/CPD in the site.
      Since:
      3.0
    • skipEmptyReport

      @Parameter(defaultValue="false") protected boolean skipEmptyReport
      Skip the PMD/CPD report generation if there are no violations or duplications found. Defaults to false.

      Note: the default value was changed from true to false with version 3.13.0.

      Since:
      3.1
    • excludeFromFailureFile

      @Parameter(property="pmd.excludeFromFailureFile", defaultValue="") protected String excludeFromFailureFile
      File that lists classes and rules to be excluded from failures. For PMD, this is a properties file. For CPD, this is a text file that contains comma-separated lists of classes that are allowed to duplicate.
      Since:
      3.7
    • showPmdLog

      @Parameter(defaultValue="true", property="pmd.showPmdLog") protected boolean showPmdLog
      Redirect PMD log into maven log out. When enabled, the PMD log output is redirected to maven, so that it is visible in the console together with all the other log output. Also, if maven is started with the debug flag (-X or --debug), the PMD logger is also configured for debug.
      Since:
      3.9.0
    • project

      @Parameter(defaultValue="${project}", readonly=true, required=true) protected MavenProject project
      The project to analyse.
    • reactorProjects

      @Parameter(property="reactorProjects", readonly=true) protected List<MavenProject> reactorProjects
      The projects in the reactor for aggregation report.
    • session

      @Parameter(defaultValue="${session}", required=true, readonly=true) protected MavenSession session
      The current build session instance. This is used for toolchain manager API calls and for dependency resolver API calls.
    • filesToProcess

      protected Map<File,PmdFileInfo> filesToProcess
      The files that are being analyzed.
  • Constructor Details

    • AbstractPmdReport

      public AbstractPmdReport()
  • Method Details