Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Ruleset not found error while customizing PMD.  RSS feed

Piyush Tripathi
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm adding a new rule to Java code analysis tool PMD using it in standalone version.I write the rule class and compile that with the jar file pmd14-4.2.4.jar. Then i add the rule's .class file to the pmd14-4.2.4.jar file.After that i write the rule's xml file and add that too to the pmd14-4.2.4.jar file.Then i add the ruleset reference to the all-java.xml file present in the pmd14-4.2.4.jar.
Then i run the tool on the commandline as follows-

C:\PMD\java14\bin>pmd.bat f:\my\ xml rulesets/nestedloopscheck.xml

It gives 'Ruleset not found' error. Some part of the error is listed below.

C:\PMD\java14\bin>pmd.bat f:\my\ xml rulesets/nestedloopscheck.xml
Ruleset not found
net.sourceforge.pmd.RuleSetNotFoundException: Can't find resource rulesets/neste
dloopscheck.xml. Make sure the resource is a valid file or URL or is on the CLA
SSPATH. Here's the current classpath: C:\PMD\java14\bin\/../../java14/lib/pmd14
at net.sourceforge.pmd.RuleSetFactory.tryToGetStreamTo(RuleSetFactory.ja
at net.sourceforge.pmd.RuleSetFactory.createSingleRuleSet(RuleSetFactory
at net.sourceforge.pmd.RuleSetFactory.createRuleSets(
at net.sourceforge.pmd.RuleSetFactory.createRuleSets(
at net.sourceforge.pmd.PMD.doPMD(
at net.sourceforge.pmd.PMD.main(

Feb 11, 2009 2:56:29 PM net.sourceforge.pmd.PMD doPMD
SEVERE: Ruleset not found

What am I doing wrong.Can anyone suggest me?

Thanks in advance,
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!