Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set ANT_HOME in Jenkins in Ubuntu

I am new to Ubuntu.I have installed ant using apt-get install ant then I tried which ant which showed the path /usr/bin/ant I included the same path in Jenkins ANT_HOME but it shows /usr/bin/ant is not a directory.I tried adding the ANT_HOME in .bashrc file .what should I need to do to set the ANT_HOME in Jenkins.Please help

like image 602
RCBian Avatar asked Jan 23 '26 19:01

RCBian


1 Answers

Jenkins can use its own versions of Ant, and this is really the preferred way. You can have multiple versions of Ant in Jenkins, and each job can use whatever version you desire.

Go to the Configuration Section ($JENKINS_SERVER/jenkins/configure). Look for the Ant section, and click on the Ant Installation button. To add an Ant installation, click on Add Ant, then add in a name which should include the Ant version. Click on the Install Automatically button, and under the Install from Apache, select the version you want to install.

Once this is done, you will get a choice of Ant installations when you select that you want to do an Ant Build when you configure a job.

Using the default Ant version can be tricky if it is updated, and your job can't use the newer version. Or, if someone adds something to the default Ant version that breaks your builds.

like image 110
David W. Avatar answered Jan 26 '26 15:01

David W.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!