A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://maven.apache.org/plugins/maven-pmd-plugin/cpd-mojo.html below:

pmd:cpd – Apache Maven PMD Plugin

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.

<compileSourceRoots>

Specifies the location of the source directories to be used for PMD. Defaults to project.compileSourceRoots.

<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.

<excludeRoots>

The project source directories that should be excluded.

<excludes>

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.

<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).

<ignoreAnnotations>

If true, CPD ignores annotations.

<ignoreIdentifiers>

Similar to ignoreLiterals but for identifiers; i.e., variable names, methods names, and so forth.

<ignoreLiterals>

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.

<includeTests>

Run PMD on the tests as well.

<includeXmlInReports>

Whether to include the XML files generated by PMD/CPD in the org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory().

<includes>

A list of files to check. Can contain Ant-style wildcards and double wildcards. Defaults to **\/*.java.

<jdkToolchain>

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:

requires at least Maven 3.3.1

<language>

The programming language to be analyzed by CPD. Valid values are currently java, javascript or jsp.

<linkXRef>

Link the violation line numbers to the (Test) Source XRef. Links will be created automatically if the JXR plugin is being used.

<locale>

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)

<minimumTokens>

The minimum number of tokens that need to be duplicated before it causes a violation.

<outputDirectory>

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 Plugin

is 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().

<outputFormat>

The report output format: null by default, to represent a site, but can be configured to a Doxia Sink id.

<outputTimestamp>

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

).

<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>

.

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.

<siteDirectory>

Directory containing the site.xml file.

<skip>

Skip the CPD report generation. Most useful on the command line via "-Dcpd.skip=true".

<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.

<targetDirectory>

The output directory for the intermediate XML report.

<testSourceRoots>

The directories containing the test-sources to be used for PMD. Defaults to project.testCompileSourceRoots

<xrefLocation>

Location where Source XRef is generated for this project.
Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref

<xrefTestLocation>

Location where Test Source XRef is generated for this project.
Default: org.apache.maven.reporting.AbstractMavenReport.getReportOutputDirectory() + /xref-test


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