4

I am not able to upload custom ruleset for pmd in eclipse. I am using eclipse LUNA and eclipse-pmd 1.8 plugin. I have tried using eclipse pmd plugin as well as pmd plugin by source forge.

I have already referred Can't import PMD Ruleset in Eclipse link and done suggested edits but no luck.

I have also searched inside PMD jar in eclipse plugin folder.

My ruleset.xml says something like:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ruleset xmlns="pmd.sf.net/ruleset/1.0.0"; name="pmd_eclipse" xmlns:xsi="w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="pmd.sf.net/ruleset_xml_schema.xsd"; xsi:schemaLocation="pmd.sf.net/ruleset/1.0.0 pmd.sf.net/ruleset_xml_schema.xsd">;
    <description>PMD Plugin preferences rule set</description>
    <rule ref="rulesets/java/strings.xml/AppendCharacterWithChar">
        <priority>4</priority>
    </rule>
Community
  • 1
  • 1
Rajeev Akotkar
  • 1,377
  • 4
  • 26
  • 46

1 Answers1

0

this could be a problem with the pmd plugin version. I was having this problem with the pmd plugin PMD for Eclipse 4. My ruleset was exported from an eclipse with PMD for Eclipse 3 plugin.

I installed PMD plugin for Eclipse 3.( download the zip file from https://sourceforge.net/projects/pmd/files/pmd-eclipse/3.2.6/)

extract the zip and copy both feature and plugin folders. go to your local eclipse installation and paste it there.do a merge when prompted. restart your eclipse.

Now you should be able to import you ruleset.

arvin_v_s
  • 1,036
  • 1
  • 12
  • 18