How to setup Apache ANT tool in Mac OS for Salesforce?

How to setup Apache ANT tool in Mac OS for Salesforce?

1. Download Apache Ant version 1.6 or newer to a directory of your choice – http://ant.apache.org/bindownload.cgi.

2. Log into a Salesforce Organization.

3. From Setup, click Develop –> Tools and select Force.com Migration Tool.

4. Save the .zip file locally and extract the contents to the directory of your choice.

5. Copy ant-salesforce.jar and paste into your Ant installation’s lib directory. The lib directory is located in the root folder of your Ant installation.

6. Execute the below command in Terminal.

vim .profile

7. Press “i” key, so that you will be in Insert mode.

8. Paste the below code

export JAVA_HOME=$(/usr/libexec/java_home)
export ANT_HOME=/Users/magulanduraipandian/Desktop/Magulan/Ant
export PATH=$PATH:$ANT_HOME/bin

9. After pasting the code, press “Esc” key.

10. Enter :wq and press “Enter” key.

11. Do the same for vim .bash_profile.

12. Go to the path using “CD” command. For example, cd Desktop/Magulan/Ant/bin and execute the ant commands.

Note:

If you face ant command not found issue, please close the terminal and open it again.

Leave a Reply