Note:This goal should be used as a Maven report.
Full name:
org.apache.maven.plugins:maven-pmd-plugin:3.15.0:aggregate-cpd
Description:
See Finding duplicated code for more details.
Attributes:
Name | Type | Since | Description |
---|---|---|---|
<outputDirectory> | File | 3.15.0 | 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. User property is: project.reporting.outputDirectory. |
<targetDirectory> | File | 3.15.0 | The output directory for the intermediate XML report. User property is: project.build.directory. |
Name | Type | Since | Description |
---|---|---|---|
<aggregate> | boolean | 2.2 | Deprecated. since 3.15.0 Use the goals pmd:aggregate-pmd and
pmd:aggregate-cpd instead. Default value is: false. User property is: aggregate. |
<compileSourceRoots> | List | 3.7 | Specifies the location of the source directories to be used for
PMD. Defaults to project.compileSourceRoots. Default value is: ${project.compileSourceRoots}. |
<excludeFromFailureFile> | String | 3.7 | 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. User property is: pmd.excludeFromFailureFile. |
<excludeRoots> | File[] | 2.2 | The project source directories that should be excluded. |
<excludes> | List | 2.2 | A list of files to exclude from checking. 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. |
<format> | String | 3.15.0 | 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). Default value is: xml. User property is: format. |
<ignoreAnnotations> | boolean | 3.11.0 | If true, CPD ignores annotations. Default value is: false. User property is: cpd.ignoreAnnotations. |
<ignoreIdentifiers> | boolean | 2.5 | Similar to ignoreLiterals but for identifiers; i.e.,
variable names, methods names, and so forth. Default value is: false. User property is: cpd.ignoreIdentifiers. |
<ignoreLiterals> | boolean | 2.5 | 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. Default value is: false. User property is: cpd.ignoreLiterals. |
<includeTests> | boolean | 2.2 | Run PMD on the tests. Default value is: false. |
<includeXmlInSite> | boolean | 3.0 | Whether to include the xml files generated by PMD/CPD in the site. Default value is: false. |
<includes> | List | 2.2 | A list of files to include from checking. Can contain Ant-style
wildcards and double wildcards. Defaults to **\/*.java. |
<jdkToolchain> | Map | 3.14.0 |
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 Toolchains for more info)<configuration> ... <jdkToolchain> <version>1.11</version> </jdkToolchain> </configuration> <configuration> ... <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> </configuration> |
<language> | String | 3.5 | The programming language to be analyzed by CPD. Valid values are
currently java, javascript or
jsp. Default value is: java. |
<linkXRef> | boolean | 3.15.0 | Link the violation line numbers to the source xref. Links will be
created automatically if the jxr plugin is being used. Default value is: true. User property is: linkXRef. |
<minimumTokens> | int | 3.15.0 | The minimum number of tokens that need to be duplicated before it
causes a violation. Default value is: 100. User property is: minimumTokens. |
<outputEncoding> | String | 2.5 | The file encoding when writing non-HTML reports. Default value is: ${project.reporting.outputEncoding}. User property is: outputEncoding. |
<showPmdLog> | boolean | 3.9.0 | 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. Default value is: true. User property is: pmd.showPmdLog. |
<skip> | boolean | 2.1 | Skip the CPD report generation. Most useful on the command line via
"-Dcpd.skip=true". Default value is: false. User property is: cpd.skip. |
<skipEmptyReport> | boolean | 3.1 | 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. Default value is: false. |
<sourceEncoding> | String | 2.3 | The file encoding to use when reading the Java sources. Default value is: ${project.build.sourceEncoding}. User property is: encoding. |
<testSourceRoots> | List | 3.7 | The directories containing the test-sources to be used for PMD.
Defaults to project.testCompileSourceRoots Default value is: ${project.testCompileSourceRoots}. |
<xrefLocation> | File | 3.15.0 | Location of the Xrefs to link to. Default value is: ${project.reporting.outputDirectory}/xref. |
<xrefTestLocation> | File | 3.15.0 | Location of the Test Xrefs to link to. Default value is: ${project.reporting.outputDirectory}/xref-test. |
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 Toolchains for more info)<configuration> ... <jdkToolchain> <version>1.11</version> </jdkToolchain> </configuration> <configuration> ... <jdkToolchain> <version>1.8</version> <vendor>zulu</vendor> </jdkToolchain> </configuration>
Note: the default value was changed from true to false with version 3.13.0.