1
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.5:pmd (pmd) on project my_project: Execution pmd of goal org.apache.maven.plugins:maven-pmd-plugin:3.5:pmd failed: org.apache.maven.reporting.MavenReportException: Unsupported targetJdk value '13'. -> [Help 1]

Is this a known issue? Is there a workaround?

Ihor M.
  • 2,728
  • 3
  • 44
  • 70
  • 1
    Upgrade to the latest version (3.13.0) that ships with a version of PMD that supports Java 13. – Johnco Apr 15 '20 at 20:48
  • Same problem https://stackoverflow.com/questions/61417986/pmd-plugin-fails-with-java-14-unsupported-targetjdk Updated pmd version - I used the latest - it did not work for me. – Yan Khonski Apr 24 '20 at 21:49

1 Answers1

2

You'll need to update the maven-pmd-plugin. Version 3.5 is already 5 years old...

Current (2020-04-25) latest released version is 3.13.0, which supports Java 13 out of the box (see https://issues.apache.org/jira/browse/MPMD-295 for the original issue).

More info on maven-pmd-plugin: https://maven.apache.org/plugins/maven-pmd-plugin/

If you want to update PMD (e.g. to support Java 14), you'll need to override the plugin's dependencies as described here: https://maven.apache.org/plugins/maven-pmd-plugin/examples/upgrading-PMD-at-runtime.html and use a version of PMD, that supports Java 14 (PMD 6.22.0+).

adangel
  • 1,816
  • 14
  • 17