Say you want to pick specific rules from various rule sets and customize them. You can do this by making your own rule set.
Use one of the current rulesets as an example. Copy and paste it into your new file, delete all the old rules from it, and change the name and description. Like this:
After you add these references it'll look something like this:
Notice that you can customize individual referenced rules. Everything but the class of the rule can be overridden in your custom ruleset.
You can specify the full path to your custom ruleset name alongside of the built-in PMD rulesets - like this:
At least, that's the way some of the IDE plugins do it. Some have other ways of adding custom rulesets.
If you have suggestions on clarifying this document, please post them to the forum. Thanks!
Finally, for many more details on building custom rulesets, pick up PMD Applied!