Friday, December 9, 2011

Getting started with Force.com Migration Tool for deployments

Pre-requisites:
  1. Apache ANT in the CLASSPATH
  2. JDK
  3. Force.com Migration tool
 Installation of ANT becomes a little tricky especially for the beginners, so here are the steps along with the screenshots.
  1. Download the latest release of Apache ANT in .zip format from Apache’s web site: http://ant.apache.org/bindownload.cgi
  2. Unzip to an appropriate folder.
  3. Install JRE, if you don’t have it already.
  4. Download force.com migration tool your salesforce org by going to Setup > Develop > Tools
  5. Unzip force.com migration tool and copy ant-salesforce.jar to the lib directory of your ANT folder created in step2.
 Now, to set the classpath for ANT installation, follow the steps below:
  1. Go to My Computer > Properties > Advanced tab > Environment Variables
  2. Create a new variable in user variables with name ANT_HOME and value as <Complete path of your ANT installation>. For eg: if your ANT installation path is D:\Downloads\apache-ant-1.8.1
    • ANT_HOME
    • Note: Don’t leave a space and don’t put a backslash at the end of the path.
    •  
  3. Create another variable JAVA_HOME and put the full path of the JDK installation in the same way as step2.
    JAVA_HOME
                                                                                           
  4. Create a third variable by the name PATH and put the value as %ANT_HOME%\bin;%JAVA_HOME%\bin
  5. PATH
  6. Now, go to DOS Prompt and type > ant  –version , if it will show a message like : Apache Ant version 1.8.1 compiled on April 30 2010, your installation is successful, cheers!!
  

I will be describing about using ANT for deployments in the next post.

No comments:

Post a Comment

Your feedback is always appreciated, thanks!!