Creating custom PMD rules
PMD has two extra features when compared to other static code review tools. The first is the
cpdgui tool, which allows you to look for the code that has been cut-and-pasted from part of the code base to another. The second, and the one that we will explore in this recipe, is the ability to design custom bug discovery rules for Java source code using Xpath.
Make sure that you have installed the Jenkins PMD plugin (https://wiki.jenkins-ci.org/display/JENKINS/PMD+Plugin). Download and unpack the PMD distribution from http://pmd.sourceforge.net. Visit the PMD bin directory, and verify that you have the startup scripts
How to do it...
- Create a Maven project from the command line using: ...