Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Using the Ant Migration Tool

The Ant Migration Tool is retired with Spring ’24. The tool continues to function as-is for future API versions but isn’t updated with new functionality and isn’t supported.  If Salesforce adds a new feature that is incompatible with Ant, the Ant Migration Tool won't be updated to support it. To manage metadata changes, switch to Salesforce CLI for a modern, supported developer experience.

Note

The Ant Migration Tool is a Java/Ant-based command-line utility for moving metadata between a local directory and a Salesforce organization. You can use the Ant Migration Tool to retrieve components, create scripted deployment, and repeat deployment patterns.

The general procedure you will follow when using the Ant Migration Tool to copy metadata from one Salesforce organization to another is:

  1. Enter credentials and connection information for source Salesforce organization in build.properties
  2. Create retrieve targets in build.xml
  3. Construct a project manifest in package.xml
  4. Run the Ant Migration Tool to retrieve metadata files from Salesforce
  5. Enter credentials and connection information for destination Salesforce organization in build.properties
  6. Run the Ant Migration Tool to deploy metadata files or deletions to Salesforce