无法为 Eclipse 安装 Cobertura 插件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18630141/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot install Cobertura plugin for Eclipse
提问by Krunal Shah
I am getting following error message when I tried to install cobertura plugin in eclipse kepler (java/j2ee version) through eclipse market place.
当我尝试通过 eclipse 市场在 eclipse kepler(java/j2ee 版本)中安装 cobertura 插件时,我收到以下错误消息。
Cannot complete the install because one or more required items could not be found. Software being installed: eCobertura 0.9.8.201007202152 (ecobertura.feature.group 0.9.8.201007202152)
Missing requirement: eCobertura 0.9.8.201007202152 (ecobertura.feature.group 0.9.8.201007202152) requires 'org.junit4 0.0.0' but it could not be found
无法完成安装,因为找不到一个或多个必需的项目。正在安装的软件:eCobertura 0.9.8.201007202152 (ecobertura.feature.group 0.9.8.201007202152)
缺少要求:eCobertura 0.9.8.201007202152 (ecobertura.feature.group 0.9.8.201007202152) 需要“org.junit4 0.0.0”但找不到
回答by user2816065
I was able to get eCobertura to install by copying over the junit plugin subdirectories from a previous version of Eclipse into my plugins/ directory, then restarting Eclipse.
我能够通过将 junit 插件子目录从先前版本的 Eclipse 复制到我的 plugins/ 目录中,然后重新启动 Eclipse 来安装 eCobertura。
The junit version that came with my Eclipse (Spring Toolsuite v3.3) was org.junit_4.11.0.v201303080030. This is that one that caused eCobertura install to fail.
我的 Eclipse(Spring 工具套件 v3.3)附带的 junit 版本是 org.junit_4.11.0.v201303080030。这就是导致 eCobertura 安装失败的原因。
The two versions that I copied over from STS 3.2 were org.junit4_4.8.1.v20120523-1257 and org.junit_4.10.0.v4_10_0_v20120426-0900.
我从 STS 3.2 复制过来的两个版本是 org.junit4_4.8.1.v20120523-1257 和 org.junit_4.10.0.v4_10_0_v20120426-0900。
回答by Bosko Mijin
Installing eCobertura
on new eclipse (Kepler
, Luna
) causes a problem because of newer version of JUnit
package which is not treated by eCobertura
dependencies checker.
eCobertura
在新的 Eclipse ( Kepler
, Luna
)上安装会导致问题,因为较新版本的JUnit
软件包不受eCobertura
依赖项检查器的处理。
One of solutions (suggested in the previous answer) is that you have to copy org.junit*
packages from old eclipse installation, but that can be a problem if you don't have it.
解决方案之一(在上一个答案中建议)是您必须org.junit*
从旧的 eclipse 安装中复制包,但如果您没有它,这可能是一个问题。
Solution for completely new installation is very similar: You have to download org.junit4_4.8.1.v20120523-1257.jar
from the internet and just place it to plugins folder of eclipse.
全新安装的解决方案非常相似:您必须org.junit4_4.8.1.v20120523-1257.jar
从互联网上下载并将其放在eclipse的plugins文件夹中。
Note that you don't need to add org.junit_4.10.0.v4_10_0_v20120426-0900.jar
in that case.
请注意,org.junit_4.10.0.v4_10_0_v20120426-0900.jar
在这种情况下您不需要添加。
After that, you will be able to install eCobertura
.
之后,您将能够安装eCobertura
.
回答by Sumit Sahay
回答by jdavis
A little late, but just wanted to add that this worked for STS 3.8.1 using Eclipse Mars. Simply download the JAR specified above and place into the 'plugins' folder.
有点晚了,但只是想补充一点,这适用于使用 Eclipse Mars 的 STS 3.8.1。只需下载上面指定的 JAR 并将其放入“插件”文件夹中。