Package org.apache.maven.plugins.pmd
Klasse AbstractPmdReport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.reporting.AbstractMavenReport
org.apache.maven.plugins.pmd.AbstractPmdReport
- Alle implementierten Schnittstellen:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
,org.apache.maven.reporting.MavenMultiPageReport
,org.apache.maven.reporting.MavenReport
public abstract class AbstractPmdReport
extends org.apache.maven.reporting.AbstractMavenReport
Base class for the PMD reports.
- Version:
- $Id$
- Autor:
- Brett Porter
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprotected boolean
Veraltet.protected String
File that lists classes and rules to be excluded from failures.protected Map
<File, PmdFileInfo> The files that are being analyzed.protected String
Set the output format type, in addition to the HTML report.protected boolean
Run PMD on the tests.protected boolean
Whether to include the xml files generated by PMD/CPD in the site.protected List
<org.apache.maven.project.MavenProject> The projects in the reactor for aggregation report.protected org.apache.maven.execution.MavenSession
The current build session instance.protected boolean
Veraltet.With 3.22.0 and the upgrade to PMD 7, this parameter has no effect anymore.protected boolean
Skip the PMD/CPD report generation if there are no violations or duplications found.protected File
The output directory for the intermediate XML report.Von Klasse geerbte Felder org.apache.maven.reporting.AbstractMavenReport
localRepository, outputDirectory, project, remoteRepositories, siteRenderer, siteTool
Von Schnittstelle geerbte Felder org.apache.maven.reporting.MavenReport
CATEGORY_PROJECT_INFORMATION, CATEGORY_PROJECT_REPORTS, ROLE
Von Schnittstelle geerbte Felder org.apache.maven.plugin.Mojo
ROLE
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
protected String
constructXRefLocation
(boolean test) protected String
protected Collection
<org.apache.maven.project.MavenProject> protected Map
<File, PmdFileInfo> Convenience method to get the list of files where the PMD tool will be executedprotected org.apache.maven.project.MavenProject
protected final org.apache.maven.toolchain.Toolchain
protected boolean
protected boolean
isXml()
Von Klasse geerbte Methoden org.apache.maven.reporting.AbstractMavenReport
closeReport, execute, executeReport, generate, generate, generate, getCategoryName, getInputEncoding, getOutputDirectory, getOutputEncoding, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, isExternalReport, setReportOutputDirectory
Von Klasse geerbte Methoden org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden org.apache.maven.reporting.MavenReport
getDescription, getName, getOutputName
-
Felddetails
-
targetDirectory
The output directory for the intermediate XML report. -
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 includeTestsRun PMD on the tests.- Seit:
- 2.2
-
aggregate
Veraltet.since 3.15.0 Use the goalspmd:aggregate-pmd
andpmd:aggregate-cpd
instead.Whether to build an aggregated report at the root, or build individual reports.- Seit:
- 2.2
-
includeXmlInSite
@Parameter(defaultValue="false") protected boolean includeXmlInSiteWhether to include the xml files generated by PMD/CPD in the site.- Seit:
- 3.0
-
skipEmptyReport
@Parameter(defaultValue="false") protected boolean skipEmptyReportSkip the PMD/CPD report generation if there are no violations or duplications found. Defaults tofalse
.Note: the default value was changed from
true
tofalse
with version 3.13.0.- Seit:
- 3.1
-
excludeFromFailureFile
@Parameter(property="pmd.excludeFromFailureFile", defaultValue="") protected String excludeFromFailureFileFile 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.- Seit:
- 3.7
-
showPmdLog
Veraltet.With 3.22.0 and the upgrade to PMD 7, this parameter has no effect anymore. The PMD log is now always redirected into the maven log and this can't be disabled by this parameter anymore. In order to disable the logging, see Maven Logging. You'd need to start maven withMAVEN_OPTS=-Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=off mvn <goals>
.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.- Seit:
- 3.9.0
-
reactorProjects
@Parameter(property="reactorProjects", readonly=true) protected List<org.apache.maven.project.MavenProject> reactorProjectsThe projects in the reactor for aggregation report. -
session
@Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession sessionThe current build session instance. This is used for toolchain manager API calls and for dependency resolver API calls. -
filesToProcess
The files that are being analyzed.
-
-
Konstruktordetails
-
AbstractPmdReport
public AbstractPmdReport()
-
-
Methodendetails
-
getProject
protected org.apache.maven.project.MavenProject getProject()- Setzt außer Kraft:
getProject
in Klasseorg.apache.maven.reporting.AbstractMavenReport
-
constructXRefLocation
-
getFilesToProcess
Convenience method to get the list of files where the PMD tool will be executed- Gibt zurück:
- a List of the files where the PMD tool will be executed
- Löst aus:
IOException
- If an I/O error occurs during construction of the canonical pathnames of the files
-
isXml
protected boolean isXml() -
canGenerateReport
public boolean canGenerateReport()- Angegeben von:
canGenerateReport
in Schnittstelleorg.apache.maven.reporting.MavenReport
- Setzt außer Kraft:
canGenerateReport
in Klasseorg.apache.maven.reporting.AbstractMavenReport
-
determineCurrentRootLogLevel
-
getToolchain
protected final org.apache.maven.toolchain.Toolchain getToolchain() -
isAggregator
protected boolean isAggregator() -
getAggregatedProjects
-
pmd:aggregate-pmd
andpmd:aggregate-cpd
instead.