Jenkins: ERROR: Can not find the Maven executable


I want to run a maven task with jenkins so i installed maven with sudo apt-get install maven command in linux and then in jenkins configurations i filled maven part like this:

but when i want to run the task i get this output:

Started by user anonymous
Building in workspace /home/services/xebium
ERROR: Couldn't find Maven executable.
Can't find target file: out/*.xml with working directory: /home/services/xebium
Reading results as UTF-8 from /home/services/xebium/out/result.xml
Parsing results...

as you can see it couldn't find maven and though couldn't run the maven goal! anybody can help?

From your snapshot it seems you haven't checked the Install automatically option which should be checked when you add Maven to Jenkins.

So check that option, install maven and try issuing the build again.

Otherwise, you may try to download the binaries yourself, drop them under some path and change the maven home path to point to latter one. The aim is to avoid the apt-get isntallation.