public abstract class AbstractPmdReport
extends org.apache.maven.reporting.AbstractMavenReport
Modifier and Type | Field and Description |
---|---|
protected boolean |
aggregate
Deprecated.
since 3.15.0 Use the goals
pmd:aggregate-pmd and pmd:aggregate-cpd
instead. See FAQ:
Why do I get sometimes false positive and/or false negative violations? for an explanation. |
protected String |
excludeFromFailureFile
File that lists classes and rules to be excluded from failures.
|
protected Map<File,PmdFileInfo> |
filesToProcess
The files that are being analyzed.
|
protected String |
format
Set the output format type, in addition to the HTML report.
|
protected boolean |
includeTests
Run PMD on the tests as well.
|
protected boolean |
includeXmlInReports
Whether to include the XML files generated by PMD/CPD in the
AbstractMavenReport.getReportOutputDirectory() . |
protected org.apache.maven.execution.MavenSession |
session
The current build session instance.
|
protected boolean |
showPmdLog
Deprecated.
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 with
MAVEN_OPTS=-Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=off mvn <goals> . |
protected boolean |
skipEmptyReport
Skip the PMD/CPD report generation if there are no violations or duplications found.
|
protected File |
targetDirectory
The output directory for the intermediate XML report.
|
locale, mojoExecution, outputDirectory, outputFormat, outputTimestamp, project, reactorProjects, remoteProjectRepositories, repoSession, siteDirectory, siteRenderer, siteTool
Constructor and Description |
---|
AbstractPmdReport() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canGenerateReportInternal() |
protected String |
constructXrefLocation(boolean test) |
protected String |
determineCurrentRootLogLevel() |
protected Collection<org.apache.maven.project.MavenProject> |
getAggregatedProjects() |
protected Map<File,PmdFileInfo> |
getFilesToProcess()
Convenience method to get the list of files where the PMD tool will be executed
|
protected org.apache.maven.plugin.MojoExecution |
getMojoExecution() |
protected org.apache.maven.project.MavenProject |
getProject() |
protected List<org.apache.maven.project.MavenProject> |
getReactorProjects() |
protected org.apache.maven.toolchain.Toolchain |
getToolchain() |
protected File |
getXrefLocation(boolean test) |
protected boolean |
isAggregator() |
protected boolean |
isXml() |
canGenerateReport, closeReport, execute, executeReport, generate, generate, getCategoryName, getInputEncoding, getLocale, getOutputDirectory, getOutputEncoding, getReportOutputDirectory, getSink, getSinkFactory, getSiteRenderer, isExternalReport, setReportOutputDirectory
getLog, getPluginContext, setLog, setPluginContext
@Parameter(property="project.build.directory", required=true) protected File targetDirectory
@Parameter(property="format", defaultValue="xml") protected String format
@Parameter(defaultValue="false") protected boolean includeTests
@Parameter(property="aggregate", defaultValue="false") @Deprecated protected boolean aggregate
pmd:aggregate-pmd
and pmd:aggregate-cpd
instead. See FAQ:
Why do I get sometimes false positive and/or false negative violations? for an explanation.@Parameter(defaultValue="false") protected boolean includeXmlInReports
AbstractMavenReport.getReportOutputDirectory()
.@Parameter(defaultValue="false") protected boolean skipEmptyReport
false
.
Note: the default value was changed from true
to false
with version 3.13.0.
@Parameter(property="pmd.excludeFromFailureFile", defaultValue="") protected String excludeFromFailureFile
@Parameter(defaultValue="true", property="pmd.showPmdLog") @Deprecated protected boolean showPmdLog
MAVEN_OPTS=-Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=off mvn <goals>
.-X
or --debug
),
the PMD logger is also configured for debug.@Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession session
protected Map<File,PmdFileInfo> filesToProcess
protected org.apache.maven.project.MavenProject getProject()
getProject
in class org.apache.maven.reporting.AbstractMavenReport
protected List<org.apache.maven.project.MavenProject> getReactorProjects()
protected org.apache.maven.plugin.MojoExecution getMojoExecution()
protected String constructXrefLocation(boolean test)
protected File getXrefLocation(boolean test)
protected Map<File,PmdFileInfo> getFilesToProcess() throws IOException
IOException
- If an I/O error occurs during construction of the
canonical pathnames of the filesprotected boolean isXml()
protected boolean canGenerateReportInternal() throws org.apache.maven.reporting.MavenReportException
org.apache.maven.reporting.MavenReportException
protected String determineCurrentRootLogLevel()
protected final org.apache.maven.toolchain.Toolchain getToolchain()
protected boolean isAggregator()
protected Collection<org.apache.maven.project.MavenProject> getAggregatedProjects()
Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.