In this, we will show you how to install Apache Ant on Mac OS
1.DownLoad Apache Ant
Go to Apache Ant WebSite and download the .tar.gz file from site.
2.Extracts the download file
Copy the downloaded file to your desired directory and extract it.
3.Environment Variable:
To build your project by using ‘ant’ , Set the command ant as. environment variable in bash_profile.Type below command in terminal and add ANT_HOME in bash_profile.
$ open ~/.bash_profile
#Add below two lines in bash_profile
export ANT_HOME=/Users/durga/apache-ant-1.9.9export PATH=$PATH::$ANT_HOME/bin
export ANT_HOME=/Users/durga/apache-ant-1.9.9export PATH=$PATH::$ANT_HOME/bin
Note: After adding step 3 details in bash_profile, please save and close it.
4.Verify the Ant Version after setup:
Open New Terminal and type below command:
ant -v
Output:
Apache Ant(TM) version 1.9.9 compiled on February 2 2017 Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
Ant is installed successfully...hope this helps you :)
Ant is installed successfully...hope this helps you :)