I have a ruleset file (config/PMD/includeRuleset.xml) for PMD which refers to the ruleset files supplied with PMD (like rulesets/java/basic.xml). I have configured Gradle to use my ruleset file:
ruleSetFiles = files("config/PMD/includeRuleset.xml")
When I run the ‘check’ target I get: java.lang.RuntimeException: Couldn’t find that class Can’t find resource rulesets/java/basic.xml. Make sure the resource is a valid file or URL or is on the CLASSPATH
So Gradle cannot find the standard rule sets supplied with PMD when they are referred through my own ruleset file.
I need this to have common PMD configuration used both by Gradle and Eclipse.
How can I solve this problem ?
Shouldn’t it be considered a bug that I can’t fine tune the rules configuration of PMD using a ruleset file ?
I can see from the API documentation that I can set a classpath containing my own PMD libraries which I think must be java classes containing rules but I wouldn’t expect it to be necessary to set the classpath for the libraries and rule set files which come together with the PMD executable.