Maven PMD Plugin 3.5 fails with JDK13

杀马特。学长 韩版系。学妹 提交于 2020-05-17 02:57:22

问题


[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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!