07 December 2016

Installing Force.com Migration Toolkit on Mac


In this blogpost, I will provide the steps on how I installed the Force.com Migration Toolkit on my MacBook with MacOS Sierra 10.12.1.

INSTALL ANT ON YOUR MAC

Step 1: If you Mac is not pre-installed with ANT you will need to download it. Go to the Apache website and download the latest tar.gz version as depicted below:


Step 2: Once downloaded, extract the files by double-clicking the downloaded archived file and saving the extracted folder into a path of your choosing. I added it on my user path ~/Users/<user_name>/apache-ant-1.9.7 



Step 3: Add the ANT path to the environment variable so that it can be called from any location in terminal. To do this we need to edit .bash_profile and export the ANT path. First, execute the command below and save the path it will give:

echo $PATH


Then open .bash_profile using the nano terminal text editor by executing the following command:

nano .bash_profile

Create the ANT_HOME variable and append it to the path retrieved earlier using colon:

export ANT_HOME=<location_of_the_extracted_ant_files>
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$ANT_HOME/bin

The editor should look like below:



Verify that you can call ant by executing ant -v



INSTALL FORCE.COM MIGRATION TOOLKIT

Step 1: Download the toolkit from the salesforce developer website

Step 2: Once downloaded, extract files by double-clicking it

Step 3: Copy ant-salesforce.jar on your ANT lib folder

Thats it! Test if its working using the sample ant script provided from the force.com migration toolkit.




1 comment: