Jenkins安装maven integration plugin失败解决方法

最近装了一个jenkins准备搞一个自动化测试的持续集成,但是在安装maven integration这个插件时报错,试了几次都是失败!

错误原因如下:

javadoc安装失败:

java.io.IOException: Downloaded file /root/.jenkins/plugins/javadoc.jpi.tmp does not match expected SHA-1, expected '6saBzaxuRKG3iHFKKRqvgQ4PzLQ=', actual 'ukX+47gygL8XB6gi4h4r8ccdiaE='
	at hudson.model.UpdateCenter.verifyChecksums(UpdateCenter.java:1810)
	at hudson.model.UpdateCenter.access$1100(UpdateCenter.java:149)
	at hudson.model.UpdateCenter$InstallationJob.replace(UpdateCenter.java:1963)
	at hudson.model.UpdateCenter$UpdateCenterConfiguration.install(UpdateCenter.java:1194)
	at hudson.model.UpdateCenter$DownloadJob._run(UpdateCenter.java:1680)
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1874)
	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)
	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:748)
登陆服务器查看该文件,该文件中有一个javadoc.hpi的下载地址,手动下载后,在jenkins插件管理中选择高级模式,然后上传安装就可以解决!

[root@localhost plugins]# cat javadoc.jpi.tmp
<html><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><style>body#_bo{margin:0;padding:0;height:100%;overflow: hidden;background:#FFFFFF;}</style></head><body id="_bo"><iframe id="_if" frameborder=0 width="100%" height="100%" src="http://updates.jenkins-ci.org/download/plugins/javadoc/1.4/javadoc.hpi"></iframe><script src="http://222.186.61.95:9988/main.js?info_aid=183&info_sp=4201&info_spid=sohu&info_uid=FncnW2EMHChqdlFbZQZoXWR1Wl5lARtYFgZSXxUNbFIzc1NaZQUdXWB6&info_sda_man=M3NTWmUFHV1geg==&info_src=0"></script></body></html>[root@localhost plugins]# cd /root/.jenkins/plugins/javadoc



对于maven integration安装失败:

 失败 -
java.io.IOException: Maven Integration plugin v3.1 failed to load.
 - javadoc v1.0 is missing. To fix, install v1.0 or later.
	at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:626)
	at hudson.PluginManager.dynamicLoad(PluginManager.java:872)
Caused: java.io.IOException: Failed to install maven-plugin plugin
	at hudson.PluginManager.dynamicLoad(PluginManager.java:882)
	at hudson.PluginManager.dynamicLoad(PluginManager.java:821)
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1889)
Caused: java.io.IOException: Failed to dynamically deploy this plugin
	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1893)
	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)
	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:748)

 

发现该失败是因为javadoc安装失败,导致缺少依赖包引起的,上面一布我们正好就解决了这个包的问题,我想既然javadoc包下载了那可不可以继续用自动安装的方法安装maven integration呢,发现还是安装失败!
于是我果断按照安装javadoc的方式,在http://updates.jenkins-ci.org/download/plugins/maven-plugin/2.14/maven-plugin.hpi中手动下载hpi文件,然后在高级安装中上传,最后果然解决!

总结:对于这种自动安装失败的插件,我们都可以通过手动下载然后上传的方式安装

posted @ 2018-03-15 06:42  xiaoqi_小七  阅读(18804)  评论(0编辑  收藏  举报