无法测试Jenkins插件 [英] Unable to test Jenkins plugin
问题描述
我实际上正在尝试使用maven开发Jenkins插件,但无法对其进行测试.
I am actually trying to develop a Jenkins plugin using maven but I am unable to test it.
我用命令mvn -cpu hpi:create
创建了我的项目.我叫project jenkins-plugin-tutorial
.我用mvn package
或mvn install
打包了它,并用mvn hpi:run
运行Jenkins服务器.
I created my project with the command mvn -cpu hpi:create
. I called the project jenkins-plugin-tutorial
. I packaged it with mvn package
or mvn install
and run the Jenkins server with mvn hpi:run
.
默认情况下,Jenkins配置页面(Jenkins菜单-> Manage Jenkins->配置系统)或构建"部分下会出现一个用于测试目的的HelloWorlBuilder,但不会显示.
By default, there is a HelloWorlBuilder for testing purpose that should appear at the Jenkins configuration page (Jenkins Menu -> Manage Jenkins -> Configure System) or under the Build section, but it does not display.
我遵循了这两个教程(此处)多次确认自己没有记错,但仍然无法正常工作.
I followed these two tutorials (here and here) step by step many times by making sure that I do not make a mistake but it still dont work.
也许我做错了.有人可以给我一些提示如何纠正我的错误.
Maybe I have made something wrong. Can somebody gives me some hint how to correct my errors.
推荐答案
我终于找到了问题的答案.问题是我使用的是Maven的旧版本,即2.2.1版本.因此,我更改为最新版本3.0.4,现在一切正常.
I finally find the answer to my questions. The problem is that I was using an old version of maven, the 2.2.1 version. So I change to the last version, 3.0.4, everything is fine now.
这篇关于无法测试Jenkins插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!