问题
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
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?
Thank you very much,
Santiago
回答1:
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.
回答2:
You need to invoke your top-level maven targets and set the goals and path to pom, for instance: goals: clean install Pom: /home/merbel/sth/pom.xml
来源:https://stackoverflow.com/questions/14201855/i-have-an-issue-running-a-jenkins-job-in-slave-using-maven-maven-home-doesn%c2%b4t-e