【问题标题】:Installing Checkstyle-Plugin (7.2.0) for Eclipse Neon fails为 Eclipse Neon 安装 Checkstyle-Plugin (7.2.0) 失败
【发布时间】:2017-04-02 13:38:23
【问题描述】:

我尝试通过将提供的链接从 http://eclipse-cs.sourceforge.net/#!/ 拖到我的 Eclipse 窗口上,为我的 Eclipse 包 Eclipse for Java Developers 安装 checkstyle-Plugin。

很遗憾,这会导致以下错误:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,net.sf.eclipsecs.branding,7.2.0.201611072237
No repository found containing: osgi.bundle,net.sf.eclipsecs.checkstyle,7.2.0.201611072237
No repository found containing: osgi.bundle,net.sf.eclipsecs.core,7.2.0.201611082201
No repository found containing: osgi.bundle,net.sf.eclipsecs.doc,7.2.0.201611082205
No repository found containing: org.eclipse.update.feature,net.sf.eclipsecs,7.2.0.201611082205
No repository found containing: osgi.bundle,net.sf.eclipsecs.ui,7.2.0.201611072237

知道如何解决这个问题吗?

使用 Marketplace 安装它也不起作用。它失败了:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at https://sourceforge.net/projects/eclipse-cs/files/updatesite/7.2.0/plugins/net.sf.eclipsecs.doc_7.2.0.201611082205.jar.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Unable to read repository at https://sourceforge.net/projects/eclipse-cs/files/updatesite/7.2.0/features/net.sf.eclipsecs_7.2.0.201611082205.jar.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

【问题讨论】:

  • 市场是否失败并显示相同的消息?
  • @nitind:我在我的问题中添加了错误消息
  • 将证书安装到 jre cacerts。详细指南是here
  • @jaydeep:我花了大约 45 分钟,但它奏效了。你能从你的评论中写一个答案,以便接受它。

标签: java eclipse plugins


【解决方案1】:

您需要将您的网络根 SSL 证书安装到 JRE 证书中。对于任何 JAVA PKIX SSL 扩展,您都可以遵循本指南。

如何获得根证书?

  1. 打开谷歌浏览器并导航到https://sourceforge.net/
  2. 点击网址旁边的图标。见下图。

  1. 单击查看证书。您可以查看层次结构并选择层次结构中最顶层的证书
  2. 确认证书名称中包含 ROOT 字样。
  3. 现在,在该层次结构部分下方,您可以看到证书的矩形图像。只需将该图像拖放到您的桌面即可。

现在你有你的根证书了!

如何将此证书安装到 JRE 证书中?

在您继续进行之前,请确认您已准确找到导致此错误的 jre。 IDE 很多时候使用与其捆绑的 jre,而不是系统 jre。就我而言,我将所有 IDE 都指向了我的系统 Java 安装。

  1. 使用 jre bin 文件夹中的 keytool.exe。
  2. 触发以下命令将您的证书放入 cacerts 文件中

keytool -import -noprompt -trustcacerts -alias ALIASNAME -file
/PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore /PATH/TO/YOUR/JDK/jre/lib/security/cacerts -storepass changeit

现在您的问题已解决!重新启动 IDE 并检查结果。

【讨论】:

  • 这个过程大致解决了问题,但我必须导入中间和源伪造证书以及根证书
猜你喜欢
  • 2017-05-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-10-28
  • 2016-10-29
  • 2011-12-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多