Using Force.com Migration Tool Part I – Configuration

By | November 23, 2015

In our previous blog “Creating Project using Force.com IDE”, we discussed one of the methods of Salesforce metadata migration i.e. migration using Force.com IDE. In this blog we will discuss another tool used for metadata migration in Salesforce i.e. Ant/Java based Force.com Migration Tool.

Real-time, bi-directional, multi-company – Sage ERP Integration with Salesforce

The Force.com Migration Tool is a Java/Ant-based command-line utility for moving metadata between a local directory and a Salesforce organization.

Steps for setting up an environment for Force.com Migration tool:

  1. Setup Environment Variable for Java

  • Set environment variable for it:

Right click My Computer -> Properties -> Advanced System Settings -> Environment variables.

  1. If ‘Path’ variable doesn’t exist:

— create new system variable- ‘PATH’ & set it to ‘C: \Program Files\java\jdk\bin’ (Your java installation directory)

  1. If ‘Path’ variable already exists :

— Alter the ‘Path’ variable & append java path with semicolon.

e.g.: ‘C: \WINDOWS\SYSTEM32;C:\Program Files\java\jdk\bin’

Force.com Migration Tool - 1

  1.  Installing salesforce_ant
  • Download the Force.com migration tool from your Salesforce Org (It can be any org). Go to Setup -> Develop -> Tools -> Force.com Migration Tool.
  • The file will get downloaded as ‘salesforce_ant_33.0.zip’. Unzip the zip file to a convenient location say c:\folder.
  1. Installing apache-ant
  • Download apache ant tool from http://ant.apache.org/bindownload.cgi
  • The file will get downloaded as ‘apache-ant-1.9.5-bin.zip. Unzip the zip file to a convenient location say c:\folder. Using WinZip, WinRAR, 7-zip or similar tools.
  1. Configuration Settings
  • Right click My Computer -> Properties -> Advanced System Settings -> Environment variables.
  • Create a new environment variable called ‘JAVA_HOME’ & set it to the folder where your JDK is installed.
  • Create a new environment variable called ‘ANT_HOME’ that points to the Ant installation folder say C:\apache-ant-1.8.2-bin.
  • Append the path to the Apache Ant batch file to the ‘PATH’ environment variable.

For e.g.:- ‘C: \WINDOWS\SYSTEM32;C:\Program Files\java\jdk\bin’c:\apache-ant-1.8.2- bin\bin.

  • Inside salesforce_ant_33.0 folder, you can find the ant-salesforce.jar file and some sample configuration files.

Copy the jar file mentioned above and paste it into the lib folder of your ant installation directory ‘C:\apache-ant-1.9.4-bin\apache-ant-1.9.4\lib‘.

  • Last step is to verify all installations.
  1. Verifying Java Installation:

To verify the successful installation of Java on your computer, type following command on your command prompt.

C :\> java –version
You should see an output similar to:
Java version “1.8.0_45”
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

  1. Verifying Apache Ant Installation:

To verify the successful installation of Apache Ant on your computer, type following command on your command prompt.

C :\> ant –version
You should see an output like:
Apache Ant(TM) version 1.8.2 compiled on December 20 2010

Thus we have discussed about setting up environment for using Force.com Migration Tool. In next blog, we will discuss about deploying project/metadata in Salesforce Org using Force.com Migration tool.

About Us
Greytrix as a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners across the globe. We offer Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that require apex code incorporation into the Salesforce platform.

Greytrix has some unique solutions for Cloud CRM such as Salesforce integration with Sage Enterprise Management (Sage X3), Sage Intacct, Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data Migration, Integrated App development, Custom App development and Technical Support to business partners and end users.

Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star app listed on Salesforce AppExchange.

For more information, please contact us at salesforce@greytrix.com. We will be glad to assist you.

Related Posts