在Eclipse版本上安装PMD时出错:2020-06(4.16.0) [英] Error installing PMD on Eclipse Version: 2020-06 (4.16.0)

查看:542
本文介绍了在Eclipse版本上安装PMD时出错:2020-06(4.16.0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Windows 10上升级到Eclipse版本:2020-06( 4.16.0 )。



我的Java版本为 14.0 .1 2020-04-14



升级后,我尝试从市场上安装 Eclipse-PMD 2.0 help / Eclipse Marketplace /等。)...我收到错误:


由于某些原因,无法完成安装依存关系不是
可满足安装软件:a.jre.javase 14.0.0已安装软件
:Eclipse PMD插件2.0.0.202006052026
(ch.acanda.eclipse.pmd.feature .feature.group 2.0.0.202006052026)

无法满足依赖项:
来自:Eclipse PMD插件2.0.0.202006052026(ch.acanda.eclipse.pmd.feature.feature.group 2.0.0.202006052026 )
发送至:org.eclipse.equinox.p2.iu; ch.acanda.eclipse.pmd.java.feature.feature.group
[2.0.0.202006052026,2.0.0.202006052026]无法满足依赖项:
来自:eclipse-pmd Java 2.0.0.202006052026(ch.acanda。 eclipse.pmd.java 2.0.0.202006052026)
发送至:osgi.ee; (&(osgi.ee = JavaSE)(version = 11))无法满足依赖项:
来自:eclipse-pmd Java支持(可选,JDT前提条件)2.0.0.202006052026(ch.acanda.eclipse.pmd.java .feature.feature.group 2.0.0.202006052026)
收件人:org.eclipse.equinox.p2.iu; ch.acanda.eclipse.pmd.java [2.0.0.202006052026,2.0.0.202006052026]


有人像考虑问题的根源...如果其他所有方法都失败,我可以尝试从github存储库构建PMD源( https://github.com/eclipse-pmd/eclipse-pmd ),但我无法想象为什么这是必要的。



从您提供的错误消息中,看起来好像缺少了两个依赖项:


  1. ch.acanda.eclipse.pmd.java需要(&(osgi.ee = JavaSE)(version = 11))

  2. 几个插件需要org.eclipse.equinox.p2。 iu和ch.acanda.eclipse.pmd.java

第一个问题表明您没有在Java 11+上运行Eclipse。通过打开安装详细信息对话框来检查Java版本:帮助> 关于Eclipse IDE > 安装详细信息> 配置。然后查找系统属性 java.version 。如果显示的版本低于11,则需要将Eclipse配置为与Java 11+一起运行



第二个问题看起来像是后续错误。由于无法安装ch.acanda.eclipse.pmd.java,因此也无法安装所有依赖此插件的插件。对于我来说,为什么在错误消息中还提到org.eclipse.equinox.p2.iu尚不清楚,因为eclipse-pmd不(直接)依赖于此插件,并且它应该是Eclipse中默认安装的插件。



如果这不能解决您的问题,请打开新问题,因为在Github上解决此类问题要比在Stack Overflow上容易。


I recently upgraded to Eclipse Version: 2020-06 (4.16.0) on Windows 10.

My java version is "14.0.1" 2020-04-14

After the upgrade, I attempted to install Eclipse-PMD 2.0 from the Marketplace ( help / Eclipse Marketplace / etc. ) ...I receive the error(s):

Cannot complete the install because some dependencies are not satisfiable Software being installed: a.jre.javase 14.0.0 Software being installed: Eclipse PMD Plug-in 2.0.0.202006052026 (ch.acanda.eclipse.pmd.feature.feature.group 2.0.0.202006052026)
Cannot satisfy dependency: From: Eclipse PMD Plug-in 2.0.0.202006052026 (ch.acanda.eclipse.pmd.feature.feature.group 2.0.0.202006052026) To: org.eclipse.equinox.p2.iu; ch.acanda.eclipse.pmd.java.feature.feature.group [2.0.0.202006052026,2.0.0.202006052026] Cannot satisfy dependency: From: eclipse-pmd Java 2.0.0.202006052026 (ch.acanda.eclipse.pmd.java 2.0.0.202006052026) To: osgi.ee; (&(osgi.ee=JavaSE)(version=11)) Cannot satisfy dependency: From: eclipse-pmd Java Support (Optional, JDT Prerequisite) 2.0.0.202006052026 (ch.acanda.eclipse.pmd.java.feature.feature.group 2.0.0.202006052026) To: org.eclipse.equinox.p2.iu; ch.acanda.eclipse.pmd.java [2.0.0.202006052026,2.0.0.202006052026]

Does anyone have an idea(s) as regards the source of the issue ...if all else fails I may try building the PMD source from the github repo ( https://github.com/eclipse-pmd/eclipse-pmd ) but I cannot imagine why this should be necessary.

解决方案

I created eclipse-pmd and I can install eclipse-pmd 2.0 from the marketplace with Java 14 and Eclipse 2020-06 without any problems.

From the error message you provided it looks like there are two missing dependencies:

  1. ch.acanda.eclipse.pmd.java requires (&(osgi.ee=JavaSE)(version=11))
  2. several plugins require org.eclipse.equinox.p2.iu and ch.acanda.eclipse.pmd.java

The first issue indicates that you do not run Eclipse with Java 11+. Check the Java version by opening the "Installation Details" dialog: Help > About Eclipse IDE > Installation Details > Configuration. Then look for the system property java.version. If it shows a version lower than 11, then you need to configure Eclipse to run with Java 11+.

The second issue looks like a subsequent error. Since ch.acanda.eclipse.pmd.java couldn't be installed, all plugins that depend on this plugin cannot be installed either. Why org.eclipse.equinox.p2.iu is also mentioned in the error message is unclear to me since eclipse-pmd does not (directly) depend on this plugin and it should be a plugin installed by default in Eclipse.

If this does not fix your problem, then please open a new issue on Github as it is easier to help with problems like this on Github than on Stack Overflow.

这篇关于在Eclipse版本上安装PMD时出错:2020-06(4.16.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆