build.xml, the main file containing all the possible tasks to perform, here tasks that we might want Ant to perform for our project i.e. The Salesforce Ant Migration Tool ant-salesforce.jar is an ANT extension that adds Salesforce-specific tasks to Ant.To get started first let’s understand the important files available inside the salesforce-ant folder.Now since we have completed the configuration part we will move on and see how this actually can be used with Salesforce! We have configured everything pretty much here but just make note that there is one more configuration remaining which we will cover later on in this post ?.If you see the message you have successfully configured ANT on your machine else if the error message is that ANT does not exist, then your ANT installation was not successful or environment variables were not set properly.A sample build.xml file, that exercises the deploy and retrieve API calls.A sample build.properties file that you must edit, specifying your credentials, in order to run the sample ant tasks in build.xml.An unpackaged folder contains package.xml.A removecodepkg folder contains XML files for removing the sample examples from your organization.A mypkg objects folder contains the custom objects used in the sample examples.A codepkg triggers folder contains igger.A codepkg classes folder contains SampleDeplo圜lass.cls and SampleFailingTestClass.cls.A Jar file containing the ant task: ant-salesforce.jar.
A Readme.html file that explains how to use the tools.The unzip folder contains the following:.
Before you install ANT you must first install the Java(JDK/JRE) minimum of 1.5.x version.So let’s see a simple demo at work with ANT. The example below will describe a practical example of migration from one org to another org including code.ĪNT uses XML instructions to perform the actions but to use it you don’t need to have prior knowledge of Java or Salesforce API’s (Metadata or any other), you just need a basic knowledge of XML and the ANT commands available. Let’s see how we can use ANT to deploy or retrieve one Salesforce Org’s metadata to another org. ANT performs actions faster than other two. ANT uses XML instructions to perform the appropriate operation like deploy, retrieve, list metadata and so on. ANT: A free tool from Apache that can be used for scripting build operations and in the case of Salesforce, retrieve and deploy one Salesforce org’s metadata to any other org.