I have a problem with jenkins working in slave using maven (Maven doesn't have a home)

I had a problem working with Jenkins using subordinates. Work is Maven's work, which updates the code from svn, and then builds and runs the tests, this project works well in both the master and the slave as a stand-alone project. The problem is when Master runs this project on a slave, in this case I see:

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

Both servers have maven in this directory, and both servers can run the build without installing master / slave.

Do you see what is happening? Any clues?

Many thanks,

Santiago

+3
source share
2 answers

Finally, I will solve this problem. The reason "Error: Maven Home c: \ maven doesn't exist" is because your slave node uses the master maven setting. If the subordinate wants to use his own parameter, he must override this. Cancel the settings as follows: System Management β†’ Node Management β†’ setting up your slave device β†’ Node Properties β†’ check the location of the tools β†’ Add , then set the slave parameter to maven, alias select β€œmaven”, write the directory in the maven slave directory. you may try.

+6
source

You need to call the maven top-level goals and set the goals and path to pom, for example: goals: clean install Pom: /home/merbel/sth/pom.xml

0
source

Source: https://habr.com/ru/post/1203780/


All Articles