我在使用Maven在奴隶中运行詹金斯作业时遇到问题(Maven主目录不存在) [英] I have an issue running a jenkins job in slave using maven (Maven home doesn´t exist)

查看:102
本文介绍了我在使用Maven在奴隶中运行詹金斯作业时遇到问题(Maven主目录不存在)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用奴隶运行Jenkins作业时遇到问题. 该作业是Maven作业,它从svn更新代码,然后构建并运行测试,该项目作为独立项目在主服务器和从服务器中均运行良好. 问题是Master在slave上启动该项目时,在这种情况下,我会看到:

I am experiencing an issue running Jenkins job using slaves. The job is a Maven job, that updates code from svn and then build and run tests, this project runs well in both master and slave as an standalone project. The issue is when Master launch this project in the slave, in that case I see:

...
Svn Update OK
Error: Maven Home c:\maven doesn´t exist

两个服务器都在该目录上具有Maven,并且两个服务器都可以在没有主/从设置的情况下运行构建.

Both servers have maven on that dir, and both servers are able to run the build without master/slave setup.

您能看到发生了什么吗?有任何线索吗?

Can you see what is happening? Any clues?

非常感谢您,

圣地亚哥

推荐答案

最后,我解决了这个问题. 错误:Maven主目录c:\ maven不存在"的原因是,您的从属节点使用主节点的maven设置.如果从站要使用自己的设置,则必须覆盖它. 覆盖设置,如下所示: 系统管理-> 节点管理->您的从属设置-> 节点属性->检查工具位置- > 添加,然后设置从属maven选项,别名选择"maven",目录写入从属maven目录. 您可以尝试.

Finally,I solve this problem. The reason of "Error: Maven Home c:\maven doesn´t exist" is that your slave node use the master`s maven setting . If the slave want to use its own setting , it has to override that. Override the settings as follows: System Management -> Node Management -> your slave setting -> Node Properties -> check the Tools Locations -> Add , then set the slave maven option,alias select "maven",directory write with the slave maven directory. you can try it.

这篇关于我在使用Maven在奴隶中运行詹金斯作业时遇到问题(Maven主目录不存在)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆