如何在Jenkins中安装Jacoco插件

如何在Jenkins中安装Jacoco插件,jenkins,jacoco,Jenkins,Jacoco,我运行的是Jenkins 1.627,我在从管理UI以常规方式安装JaCoCo插件时遇到了问题 我能够安装许多其他插件而没有问题,但对于JaCoCo插件,安装失败,出现以下异常,这表明存档有问题。事实上,当我使用浏览器从下面的链接下载时,它只下载约7kb的hpi文件,即使预期大小大于5MB。我也尝试了几个旧版本,结果相同 为什么会这样?有人成功安装了插件吗 hudson.util.IOException2: Failed to download from http://updates.jenki

我运行的是Jenkins 1.627,我在从管理UI以常规方式安装JaCoCo插件时遇到了问题

我能够安装许多其他插件而没有问题,但对于JaCoCo插件,安装失败,出现以下异常,这表明存档有问题。事实上,当我使用浏览器从下面的链接下载时,它只下载约7kb的hpi文件,即使预期大小大于5MB。我也尝试了几个旧版本,结果相同

为什么会这样?有人成功安装了插件吗

hudson.util.IOException2: Failed to download from http://updates.jenkins-ci.org/download/plugins/jacoco/1.0.19/jacoco.hpi (redirected to: http://jenkins.mirror.isppower.de/plugins/jacoco/1.0.19/jacoco.hpi)
    at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:797)
    at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1148)
    at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1309)
    at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Inconsistent file length: expected 5196617 but only got 6808
    at hudson.model.UpdateCenter$UpdateCenterConfiguration.download(UpdateCenter.java:784)
    ... 7 more

查看您的异常消息

未能从下载 重定向到:

原因:java.io.IOException:文件长度不一致:应为 5196617,但只得到6808

特定镜像上似乎缺少该文件。请再试一次,因为我开始写答案时url返回404,最后返回200 步骤1:下载并放入$JENKINS_主页/插件文件夹。 步骤2:重新启动Jenkins。完成。 解决方案2 步骤1:下载 步骤2:转到上传插件部分,上传jacoco.hpi并重新启动Jenkins。完成。
我试了好几次,仍然只下载了7kb的hpi文件。我通过从源代码构建插件并手动安装解决了这个问题。我无法在任何地方下载正确的二进制文件。