I am trying to use latest version of PMD 5.2.0 release on my Java project which used jdk 1.8. We are using Maven, hence I used maven-pmd-plugin:3.2 version to run pmd check.
PMD configuration is given below
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-pmd-plugin</artifactId><version>3.2</version><configuration><targetJdk>1.8</targetJdk><!-- Minimum Priority = 5 Maximum Priority = 0 --><failurePriority>2</failurePriority><verbose>true</verbose><rulesets><ruleset>custom.pmd.rulesets.xml</ruleset></rulesets></configuration><executions><execution><phase>verify</phase><goals><goal>check</goal></goals></execution></executions><dependencies><dependency><groupId>net.sourceforge.pmd</groupId><artifactId>pmd-core</artifactId><version>5.2.0</version></dependency><dependency><groupId>net.sourceforge.pmd</groupId><artifactId>pmd-java</artifactId><version>5.2.0</version></dependency></dependencies></plugin>
I am getting below error during the build
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.2:pmd (pmd) on project copula-record: Execution pmd of goal org.apache.maven.plugins:maven-pmd-plugin:3.2:pmd failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-pmd-plugin:3.2:pmd: java.lang.NoSuchMethodError: net.sourceforge.pmd.lang.LanguageVersion.findByTerseName(Ljava/lang/String;)Lnet/sourceforge/pmd/lang/LanguageVersion;
Has anybody else encountered this and knows resolution? Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Upgrading the maven-pmd-plugin to PMD 5.2.x is unfortunately not so easy - it needs additionally to the dependencies some code changes.
But it will happen hopefully soon.
Hi,
I am trying to use latest version of PMD 5.2.0 release on my Java project which used jdk 1.8. We are using Maven, hence I used maven-pmd-plugin:3.2 version to run pmd check.
PMD configuration is given below
I am getting below error during the build
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.2:pmd (pmd) on project copula-record: Execution pmd of goal org.apache.maven.plugins:maven-pmd-plugin:3.2:pmd failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-pmd-plugin:3.2:pmd: java.lang.NoSuchMethodError: net.sourceforge.pmd.lang.LanguageVersion.findByTerseName(Ljava/lang/String;)Lnet/sourceforge/pmd/lang/LanguageVersion;
Has anybody else encountered this and knows resolution? Thanks
Upgrading the maven-pmd-plugin to PMD 5.2.x is unfortunately not so easy - it needs additionally to the dependencies some code changes.
But it will happen hopefully soon.
See also: http://jira.codehaus.org/browse/MPMD-191 and https://github.com/apache/maven-plugins/pull/30