4
votes

I'm using the automatic installation option for Ant but still jenkins complains that it cannot find the executable. Am I missing something? I have given the path to the ant version we use. It has successfully downloaded and unpacked it on the server but it still complains it can't find the executable.

3
What operating system is your Jenkins on?Slav

3 Answers

7
votes

Did you install Ant? Is it in Jenkin's PATH? If not, Jenkins cannot use the default version of Ant.

However, if you go into the Jenkins configuration page, you can install various versions of Ant. For example, you may want to install the latest version of Ant, and Ant 1.5 for that one project that cannot use any version of Ant beyond 1.5:

Ant Configurations to use

When you define your project, you can select the version of Ant you want to use. When you select that you want to Invoke Ant as a build step, you are given a drop down menu of what version of Ant you want to use. The first is the Default which is the Ant version found in your PATH. However, if you've gone into Jenkins configuration and downloaded other versions of Ant, you can use one of those instead.

Choosing to use Ant 1.9 instead of the default Ant installed

1
votes

I think is more easy to you install ant manually , or you need check the jenkins log file for detailed errors

1
votes

Found what I missed. I had to add the name of the directory it unpacks the ant file to in the "Subdirectory of extracted archive" field. Forgot to mention we are using a fairly old version of ant. (1.7.0).