Salesforce Deployment Using ANT Migration Tool – Part 1

Force.com migration tool(based on JAVA), is used to deploy the Metadata from one organization to other organization or we can use it to retrieve the metadata from one organization and then make some changes locally and then deploy that metadata again to the same organization.

Advantages of ANT over Changesets

  • The main advantage of this tool is, that it gets the metadata in form of XML files from your server and downloads it locally on your computer. Thus you can make changes in those XML files locally and again deploy the changes to any server instance, any target org that you want.
  • It allows you to deploy the same metadata any number of times to any of your server, as you have downloaded the metadata in form of XML files, you can deploy them again and again.
  • Change set does not allow you to delete any metadata component from target org. But using ANT migration tool you can delete the components from target org. This is done using destructiveChanges.xml file.
  • Some components are not supported to be migrated using change sets but you can migrate them using ANT migration tool.
  • It can also be run from command prompt using some specific commands for calling APIs.
  • You can also automate your migration process leveraging the capabilities of command prompt .bat files and XML structure of source files.

This tool works with the help of some XML files. In those XML files, we provide information about our server ( like credentials, login URL, and some other attributes as well, file is build.properties ) , information about the operation that we want to perform (these are called targets, like retrieve or deploy, file is
build.xml), then information about the components that you want to retrieve or deploy(package.xml).

This is continued in next post

Permanent link to this article: https://salesforcebuddy.com/2019/04/salesforce-deployment-using-ant-migration-tool-part-1/

Leave a Reply

Your email address will not be published.