The PMD Plugin allows you to automatically run the PMD code analysis tool on your project's source code and generate a site report with its results. It also supports the separate Copy/Paste Detector tool (or CPD) distributed with PMD.
This version of Maven PMD Plugin uses PMD 7.14.0 and requires Java 8. See Upgrading PMD at Runtime for more information.
The plugin accepts configuration parameters that can be used to customize the execution of the PMD tool.
Goals OverviewThis plugin has the following goals:
test-compile
phase again.pmd:pmd
prior to executing itself.pmd:aggregate-pmd
prior to executing itself.pmd:cpd
prior to executing itself.pmd:aggregate-cpd
prior to executing itself.General instructions on how to use the PMD Plugin can be found on the usage page. Some more specific use cases are described in the examples given below.
In case you still have questions regarding the plugin's usage, please have a look at the FAQ and feel free to contact the user mailing list. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the mail archive.
If you feel like the plugin is missing a feature or has a defect, you can file a feature request or bug report in our issue tracker. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our source repository and will find supplementary information in the guide to helping with Maven.
Upgrading Notes 3.22.0showPmdLog
makes no sense anymore and is deprecated now. See Maven Logging for how to configure logging. For disabling PMD logs, you'd need to start maven with MAVEN_OPTS=-Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=off mvn <goals>
./category/java/bestpractices.xml
. So when upgrading to Maven PMD Plugin 3.9.0 you should review your plugin configuration and/or custom ruleset. See Using Rule Sets for more information.To provide you with better understanding of some usages of the Maven PMD Plugin, you can take a look into the following examples:
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