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

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

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

如何获得根证书?

  1. 打开Goog​​le Chrome并导航至https://sourceforge.net/
  2. 点击您url旁边的图标。 见下图。

在此处输入图像描述

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

现在你有你的根证书!

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

在继续之前,请确认您确切找到了发出此错误的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并检查结果。