This goal should be used as a Maven report.
Creates a report for PMD's Copy/Paste Detector (CPD) tool. It can also generate a cpd results file in any of these formats: xml, csv or txt.
Parameter Details <aggregate>Whether to build an aggregated report at the root, or build individual reports.
boolean
2.2
No
aggregate
false
Specifies the location of the source directories to be used for PMD. Defaults to project.compileSourceRoots
.
java.util.List<java.lang.String>
3.7
No
${project.compileSourceRoots}
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.
java.lang.String
3.7
No
pmd.excludeFromFailureFile
The project source directories that should be excluded.
java.io.File[]
2.2
No
A list of files to exclude from checks. Can contain Ant-style wildcards and double wildcards. Note that these exclusion patterns only operate on the path of a source file relative to its source root directory. In other words, files are excluded based on their package and/or class name. If you want to exclude entire source root directories, use the parameter excludeRoots
instead.
java.util.List<java.lang.String>
2.2
No
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).
java.lang.String
No
format
xml
If true, CPD ignores annotations.
boolean
3.11.0
No
cpd.ignoreAnnotations
false
Similar to ignoreLiterals
but for identifiers; i.e., variable names, methods names, and so forth.
boolean
2.5
No
cpd.ignoreIdentifiers
false
If true, CPD ignores literal value differences when evaluating a duplicate block. This means that foo=42;
and foo=43;
will be seen as equivalent. You may want to run PMD with this option off to start with and then switch it on to see what it turns up.
boolean
2.5
No
cpd.ignoreLiterals
false
Run PMD on the tests as well.
boolean
2.2
No
false
Whether to include the XML files generated by PMD/CPD in the org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory()
.
boolean
3.0
No
false
A list of files to check. Can contain Ant-style wildcards and double wildcards. Defaults to **\/*.java.
java.util.List<java.lang.String>
2.2
No
Allow for configuration of the jvm used to run PMD via maven toolchains. This permits a configuration where the project is built with one jvm and PMD is executed with another. This overrules the toolchain selected by the maven-toolchain-plugin.
Examples:
(see
Guide to Toolchainsfor more info)
<configuration>
...
<jdkToolchain>
<version>1.11</version>
</jdkToolchain>
</configuration>
<configuration>
...
<jdkToolchain>
<version>1.8</version>
<vendor>zulu</vendor>
</jdkToolchain>
</configuration>
note:
requires at least Maven 3.3.1
java.util.Map<java.lang.String, java.lang.String>
3.14.0
No
The programming language to be analyzed by CPD. Valid values are currently java
, javascript
or jsp
.
java.lang.String
3.5
No
java
Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.
boolean
No
linkXRef
true
The locale to use when the report generation is invoked directly as a standalone Mojo.
See also: org.apache.maven.doxia.tools.SiteTool.DEFAULT_LOCALE, org.apache.maven.doxia.tools.SiteTool.getSiteLocales(java.lang.String)
java.lang.String
No
default
The minimum number of tokens that need to be duplicated before it causes a violation.
int
No
minimumTokens
100
The shared output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the shared output directory configured in the
Maven Site Pluginis used instead.
A plugin may use any subdirectory structure (either using a hard-coded name or, ideally, an additional user-defined mojo parameter with a default value) to generate multi-page reports or external reports with the main output file (entry point) denoted by #getOutputName()
.
java.io.File
Yes
${project.build.directory}/reports
The report output format: null by default, to represent a site, but can be configured to a Doxia Sink id.
java.lang.String
No
output.format
Timestamp for reproducible output archive entries, either formatted as ISO 8601
yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like
SOURCE_DATE_EPOCH).
java.lang.String
No
${project.build.outputTimestamp}
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>
.
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.
boolean
3.9.0
No
pmd.showPmdLog
true
Directory containing the site.xml
file.
java.io.File
No
${basedir}/src/site
Skip the CPD report generation. Most useful on the command line via "-Dcpd.skip=true".
boolean
2.1
No
cpd.skip
false
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.
boolean
3.1
No
false
The output directory for the intermediate XML report.
java.io.File
Yes
project.build.directory
The directories containing the test-sources to be used for PMD. Defaults to project.testCompileSourceRoots
java.util.List<java.lang.String>
3.7
No
${project.testCompileSourceRoots}
Location where Source XRef is generated for this project.
Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory()
+ /xref
java.io.File
No
Location where Test Source XRef is generated for this project.
Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory()
+ /xref-test
java.io.File
No
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4