问题
[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?
回答1:
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+).
来源:https://stackoverflow.com/questions/61237831/maven-pmd-plugin-3-5-fails-with-jdk13