title: Can't find resource 'rulesets/plsql/codesize.xml' for rule 'NPathComplexity'
body: <p>Please, I need some help with the following error.</p>
  
  <p>I am setting up the <strong>PMD plugin</strong> in a <strong>Maven project</strong>, however is returning some errors that I can not identify the cause.</p>
  
  <p>I'm currently using the following setup:</p>
  
  <ul>
  <li>Eclipse Mars 4.5.1</li>
  <li>Maven 3.3.3</li>
  <li>maven-pmd-plugin 3.5</li>
  </ul>
  
  <hr>
  
  <p>I define my PMD rules by setting the rules in a file called <code>ruleset.xml</code> at the root of my workspace.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="pmd-eclipse"
      xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"&gt;
  
      &lt;description&gt;PMD Plugin preferences rule set&lt;/description&gt;
  
      &lt;rule ref="rulesets/plsql/codesize.xml/NPathComplexity" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/ExcessiveMethodLength" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/ExcessiveParameterList" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/ExcessiveObjectLength" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/ExcessiveTypeLength" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/ExcessivePackageBodyLength" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/ExcessivePackageSpecificationLength" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/CyclomaticComplexity" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/TooManyFields" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/NcssMethodCount" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/NcssObjectCount" /&gt;
      &lt;rule ref="rulesets/plsql/codesize.xml/TooManyMethods" /&gt;
      ...
  &lt;/ruleset&gt;
  </code></pre>
  
  <p>Once I configured the PMD plugin in <code>pom.xml</code> file</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-pmd-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.5&lt;/version&gt;
      &lt;configuration&gt;
          &lt;linkXRef&gt;true&lt;/linkXRef&gt;
          &lt;verbose&gt;true&lt;/verbose&gt;
          &lt;failOnViolation&gt;false&lt;/failOnViolation&gt;
          &lt;rulesets&gt;
              &lt;ruleset&gt;ruleset.xml&lt;/ruleset&gt;
          &lt;/rulesets&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;goals&gt;
                  &lt;goal&gt;pmd&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;package&lt;/phase&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>When I run <code>pmd:pmd</code><br>
  I get the following errors:</p>
  
  <ul>
  <li><code>net.sourceforge.pmd.RuleSetNotFoundException: Can't find resource 'rulesets/plsql/codesize.xml' for rule 'NPathComplexity'.  Make sure the resource is a valid file or URL and is on the CLASSPATH. Here's the current classpath: /Applications/Eclipse JEE.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-classworlds-2.5.2.jar</code></li>
  <li><code>[WARNING] Failure executing PMD: Couldn't find the class Can't find resource 'rulesets/plsql/codesize.xml' for rule 'NPathComplexity'.  Make sure the resource is a valid file or URL and is on the CLASSPATH. Here's the current classpath: /Applications/Eclipse JEE.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-classworlds-2.5.2.jar</code></li>
  </ul>
  
  <h2>Console Log</h2>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building cadNoticiaMvn1 Maven Webapp 0.0.1
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-pmd-plugin:3.5:pmd (default-cli) @ cadNoticiaMvn1 ---
  net.sourceforge.pmd.RuleSetNotFoundException: Can't find resource 'rulesets/plsql/codesize.xml' for rule 'NPathComplexity'.  Make sure the resource is a valid file or URL and is on the CLASSPATH. Here's the current classpath: /Applications/Eclipse JEE.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-classworlds-2.5.2.jar
      at net.sourceforge.pmd.RuleSetReferenceId.getInputStream(RuleSetReferenceId.java:405)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:176)
      at net.sourceforge.pmd.RuleSetFactory.createRule(RuleSetFactory.java:201)
      at net.sourceforge.pmd.RuleSetFactory.parseRuleReferenceNode(RuleSetFactory.java:510)
      at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:293)
      at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:242)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:176)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:171)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:135)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:119)
      at net.sourceforge.pmd.RulesetsFactoryUtils.getRuleSets(RulesetsFactoryUtils.java:31)
      at net.sourceforge.pmd.processor.AbstractPMDProcessor.createRuleSets(AbstractPMDProcessor.java:54)
      at net.sourceforge.pmd.processor.MultiThreadProcessor.processFiles(MultiThreadProcessor.java:38)
      at net.sourceforge.pmd.PMD.processFiles(PMD.java:352)
      at org.apache.maven.plugin.pmd.PmdReport.executePmd(PmdReport.java:377)
      at org.apache.maven.plugin.pmd.PmdReport.executePmdWithClassloader(PmdReport.java:280)
      at org.apache.maven.plugin.pmd.PmdReport.canGenerateReport(PmdReport.java:254)
      at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:119)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  [WARNING] Failure executing PMD: Couldn't find the class Can't find resource 'rulesets/plsql/codesize.xml' for rule 'NPathComplexity'.  Make sure the resource is a valid file or URL and is on the CLASSPATH. Here's the current classpath: /Applications/Eclipse JEE.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-classworlds-2.5.2.jar
  java.lang.RuntimeException: Couldn't find the class Can't find resource 'rulesets/plsql/codesize.xml' for rule 'NPathComplexity'.  Make sure the resource is a valid file or URL and is on the CLASSPATH. Here's the current classpath: /Applications/Eclipse JEE.app/Contents/Eclipse/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-classworlds-2.5.2.jar
      at net.sourceforge.pmd.RuleSetFactory.classNotFoundProblem(RuleSetFactory.java:270)
      at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:260)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:176)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:171)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:135)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:119)
      at net.sourceforge.pmd.RulesetsFactoryUtils.getRuleSets(RulesetsFactoryUtils.java:31)
      at net.sourceforge.pmd.processor.AbstractPMDProcessor.createRuleSets(AbstractPMDProcessor.java:54)
      at net.sourceforge.pmd.processor.MultiThreadProcessor.processFiles(MultiThreadProcessor.java:38)
      at net.sourceforge.pmd.PMD.processFiles(PMD.java:352)
      at org.apache.maven.plugin.pmd.PmdReport.executePmd(PmdReport.java:377)
      at org.apache.maven.plugin.pmd.PmdReport.executePmdWithClassloader(PmdReport.java:280)
      at org.apache.maven.plugin.pmd.PmdReport.canGenerateReport(PmdReport.java:254)
      at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:119)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.813 s
  [INFO] Finished at: 2015-12-15T19:09:18-03:00
  [INFO] Final Memory: 16M/220M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>Even adding the <code>plexus-classworlds</code> dependence, it still fails.</p>