Menu

Writting custom Java rules for JavaScript/EcmaScript files

Venkat
2018-07-16
2018-07-16
  • Venkat

    Venkat - 2018-07-16

    Facing an error while writting custom java rules for JavaScript Files. help will be appreciated.

    dependencies {
    //compile('org.springframework.boot:spring-boot-starter')

    compile group: 'net.sourceforge.pmd', name: 'pmd', version: '6.5.0'
    compile group: 'net.sourceforge.pmd', name: 'pmd-java', version: '6.5.0'
    compile group: 'net.sourceforge.pmd', name: 'pmd-xml', version: '6.5.0'
    compile group: 'net.sourceforge.pmd', name: 'pmd-javascript', version: '6.5.0'
    

    }

    public class EcmaScriptRule extends AbstractEcmascriptRule {

    @Override
    public Object visit(ASTAstRoot node, Object data) {
        System.out.println("processing the rule for the file : "+node);
        return super.visit(node, data);
    }
    

    }

    java.lang.NoSuchMethodError: net.sourceforge.pmd.lang.ecmascript.rule.AbstractEcmascriptRule.definePropertyDescriptor(Lnet/sourceforge/pmd/properties/PropertyDescriptor;)V

    i can see other people are also faced similar issues but not able to found solution in the respective topics.

     
    • Juan Sotuyo

      Juan Sotuyo - 2018-07-16

      The dependency compile group: 'net.sourceforge.pmd', name: 'pmd', version:
      '6.5.0' is incorrect.

      You should include compile group: 'net.sourceforge.pmd', name: 'pmd-core',
      version: '6.5.0'

      The pmd artifact is a parent pom, the jar for base functionality is pmd-core
      .

      Regards

      On Mon, Jul 16, 2018 at 9:47 AM Venkat venkatpmd@users.sourceforge.net
      wrote:

      Facing an error while writting custom java rules for JavaScript Files.
      help will be appreciated.

      dependencies {
      //compile('org.springframework.boot:spring-boot-starter')

          compile group: 'net.sourceforge.pmd', name: 'pmd', version: '6.5.0'
          compile group: 'net.sourceforge.pmd', name: 'pmd-java', version:
      

      '6.5.0'
      compile group: 'net.sourceforge.pmd', name: 'pmd-xml', version:
      '6.5.0'
      compile group: 'net.sourceforge.pmd', name: 'pmd-javascript',
      version: '6.5.0'
      }

      public class EcmaScriptRule extends AbstractEcmascriptRule {

          @Override
          public Object visit(ASTAstRoot node, Object data) {
                  System.out.println("processing the rule for the file :
      

      "+node);
      return super.visit(node, data);
      }

      }

      java.lang.NoSuchMethodError:
      net.sourceforge.pmd.lang.ecmascript.rule.AbstractEcmascriptRule.definePropertyDescriptor(Lnet/sourceforge/pmd/properties/PropertyDescriptor;)V

      i can see other people are also faced similar issues but not able to found
      solution in the respective topics.


      Writting custom Java rules for JavaScript/EcmaScript files


      Sent from sourceforge.net because you indicated interest in <
      https://sourceforge.net/p/pmd/discussion/188192/>

      To unsubscribe from further messages, please visit <
      https://sourceforge.net/auth/subscriptions/>

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.