使用旧的eclipse版本(2020-06),安装插件失败

问题描述 投票:0回答:1

我已经研究了这个错误很多,但还没有找到解决方案。

由于与我们正在开发的一些软件的兼容性原因,我们需要使用Eclipse IDE版本2020-06。 不幸的是,这个版本似乎使用旧的Equinox框架版本,它不支持当今大多数插件用于签名的算法。

错误:

An error occurred while collecting items to be installed
session context was:(profile=epp.package.rcp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Problems downloading artifact: osgi.bundle,org.sonarlint.eclipse.cdt,7.8.0.63129.
Error reading signed content:C:\Users\me~1\AppData\Local\Temp\signatureFile3792878232785362905.jar
An error occurred while processing the signatures for the file: C:\Users\me~1\AppData\Local\Temp\signatureFile3792878232785362905.jar

日志错误:

!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2023-03-24 11:50:21.996
!MESSAGE Problems downloading artifact: org.eclipse.update.feature,org.sonarlint.eclipse.feature,7.8.0.63129.
!SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 2 2023-03-24 11:50:21.996
!MESSAGE Error reading signed content:C:\Users\me~1\AppData\Local\Temp\signatureFile4976703525857637395.jar
!STACK 0
java.security.NoSuchAlgorithmException: An error occurred while processing the signatures for the file: C:\Users\me~1\AppData\Local\Temp\signatureFile4976703525857637395.jar
    at org.eclipse.osgi.internal.signedcontent.SignedBundleHook.getSignedContent(SignedBundleHook.java:231)
    at org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier.verifyContent(SignatureVerifier.java:84)
    at org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier.verify(SignatureVerifier.java:66)
    at org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier.close(SignatureVerifier.java:115)
    at org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep.close(ProcessingStep.java:92)
    at org.eclipse.equinox.internal.p2.artifact.processors.checksum.MessageDigestProcessingStep.close(MessageDigestProcessingStep.java:58)
    at org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep.close(ProcessingStep.java:92)
    at org.eclipse.equinox.internal.p2.artifact.processors.checksum.MessageDigestProcessingStep.close(MessageDigestProcessingStep.java:58)
    at org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep.close(ProcessingStep.java:92)
    at org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ZipVerifierStep.close(ZipVerifierStep.java:48)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.reportStatus(SimpleArtifactRepository.java:1250)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:645)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:776)
    at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.getArtifact(MirrorRequest.java:319)
    at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:289)
    at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:225)
    at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:155)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:759)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.DownloadJob.run(DownloadJob.java:64)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.security.NoSuchAlgorithmException: No algorithm found for 1.2.840.113549.1.1.11
    at org.eclipse.osgi.internal.signedcontent.PKCS7Processor.findEncryption(PKCS7Processor.java:95)
    at org.eclipse.osgi.internal.signedcontent.PKCS7Processor.processSignerInfos(PKCS7Processor.java:364)
    at org.eclipse.osgi.internal.signedcontent.PKCS7Processor.<init>(PKCS7Processor.java:172)
    at org.eclipse.osgi.internal.signedcontent.SignatureBlockProcessor.processSigner(SignatureBlockProcessor.java:109)
    at org.eclipse.osgi.internal.signedcontent.SignatureBlockProcessor.process(SignatureBlockProcessor.java:76)
    at org.eclipse.osgi.internal.signedcontent.SignedBundleFile.initializeSignedContent(SignedBundleFile.java:47)
    at org.eclipse.osgi.internal.signedcontent.SignedBundleHook.getSignedContent(SignedBundleHook.java:223)
    ... 19 more

我已经在互联网上找到了讨论此错误的以下链接,但是解决方案似乎是升级到较新版本的 eclipse,这对我们来说是不可能的。

链接1:https://github.com/spotbugs/spotbugs/issues/1754 链接2:https://bugs.eclipse.org/bugs/show_bug.cgi?id=572034

有谁知道如何在旧版本的 eclipse 中解决这个问题,例如我的 2020-06 版本?

eclipse ide osgi equinox
1个回答
0
投票

我在公司使用的Eclipse版本也是2020.06。

为了解决devstyle安装问题,我在网上疯狂寻找答案,最后在这里找到了关键字工具p2。

经过8个小时的努力,我终于找到了解决方案。

我通过脚本安装了devstyle。

在运行脚本之前,必须下载

commons-httpclient-3.1.0.jar
并将其放置在
./eclipse/dropins/
文件夹中,以便devstyle在安装过程中需要它。

然后在有ecplisec.exe的

eclipse root folder
中运行脚本。

以下是

script.bat

eclipsec.exe -application org.eclipse.equinox.p2.director -repository https://downloads.genuitec.com/downloads/products/devstyle/updates/ds20200720 -repository https://downloads.genuitec.com/downloads/products/codetogether/updates/ct20200716 -installIUs com.genuitec.eclipse.theming.feature.feature.group,com.genuitec.eclipse.codetogether.feature.feature.group

echo Press any key to exit
pause >nul

解释如下:

  • 通过启动eclipse内置工具p2来安装devstyle插件
  • 通过指定远程存储库 genuitec 的 URL 来下载适当版本的 devstyle 和代码
© www.soinside.com 2019 - 2024. All rights reserved.