Using Rule Sets

The PMD plugin uses three default rule sets: basic.xml, unusedcode.xml and imports.xml. These rule sets are bundled in the PMD code analysis tool (see the ruleset index). To use other rule sets, you can configure it in the plugin as shown below.

The rule sets may reside in the classpath, filesystem or at a URL. For rule sets that are bundled with the PMD tool, you do not need to specificy the absolute path of the file. It will be resolved by the plugin. But if the rule set is a custom rule set, you need to specify its absolute path.

            <!-- Two rule sets that come bundled with PMD -->
            <!-- Custom local file system rule set -->
            <!-- Custom remote rule set accessed via a URL -->