Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMD 5.0.0 incompatible with ObjCLanguage-0.0.7-SNAPSHOT.jar #8

Open
ellemenno opened this issue Nov 15, 2012 · 3 comments
Open

PMD 5.0.0 incompatible with ObjCLanguage-0.0.7-SNAPSHOT.jar #8

ellemenno opened this issue Nov 15, 2012 · 3 comments

Comments

@ellemenno
Copy link

When using PMD 5.0.0, I get the following error message for every file, and hence no output:

java.lang.NoSuchMethodError: net.sourceforge.pmd.cpd.SourceCode.getCodeBuffer()Ljava/lang/StringBuffer;
    at net.sourceforge.pmd.cpd.ObjectivecTokenizer.tokenize(ObjectivecTokenizer.java:27)
    at net.sourceforge.pmd.cpd.CPD.add(CPD.java:102)
    at net.sourceforge.pmd.cpd.CPD.add(CPD.java:68)
    at net.sourceforge.pmd.cpd.CPD.addDirectory(CPD.java:78)
    at net.sourceforge.pmd.cpd.CPD.addRecursively(CPD.java:63)
    at net.sourceforge.pmd.cpd.CPD.main(CPD.java:138)

my CPD command line looks like this (added the logging flag temporarily to get above err msg):

java
-DObjC-CPD-LoggingEnabled=YES
-Xmx512m
-classpath "/tools/pmd/lib/asm-3.2.jar:/tools/pmd/lib/jaxen-1.1.1.jar:/tools/pmd/lib/pmd-5.0.0.jar:/tools/pmd/lib/ObjCLanguage-0.0.7-SNAPSHOT.jar"
net.sourceforge.pmd.cpd.CPD
--files "/project/files/"
--minimum-tokens 100
--language ObjectiveC
--encoding UTF-8
--format net.sourceforge.pmd.cpd.XMLRenderer
> "cpd.xml"

Work-around: download and use PMD 4.2.6.

@Jennifer-fu
Copy link

@kylerobson
Copy link

Jennifer-fu I tried the latest CPD with that ObjCLanguage snapshot, and it didn't work. I had to go back to the old CPD. I want to use the latest CPD so I can get exclude files support... I have 20,000 lines of false positives.

@wli3
Copy link

wli3 commented Oct 2, 2014

Most easy way to fix it, copy paste the ObjCLanguage-0.0.8-SNAPSHOT.jar to latest PMD 5.1.3 /lib folder, so it will be auto included in to the java path, run pmd-5.1.2/bin/run.sh instead, since it need more dependency now, so the command is something like

./run.sh cpd --minimum-tokens 100 --language ObjectiveC --files xxxxxxxxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants