为Eclipse安装Checkstyle-Plugin(7.2.0)Neon失败

时间:2016-11-18 16:11:00

标签: java eclipse plugins

我试图通过将提供的链接从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

1 个答案:

答案 0 :(得分:3)

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

如何获得根证书?

  1. 打开Goog​​le Chrome并导航至https://sourceforge.net/
  2. 点击您网址旁边的图标。见下图。
  3. enter image description here

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

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

      在继续进行之前,请确认您确切找到了发出此错误的jre。很多时候IDE使用与它捆绑的jre而不是系统jre。在我的例子中,我将所有IDE指向我的系统Java安装。

      1. 在jre bin文件夹中使用keytool.exe。
      2. 按照命令将证书放入cacerts文件
      3.   

        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并检查结果。