DescriptionField
Optional. Defaults to false. Prints the SOAP requests and responses to the console. This option
shows the user’s password in plain text during login.
trace
Note: The Ant Migration Tool ignores files or folders with a name starting with a period (.) or ending with a tilde (~) when deploying
files. Some source control systems, such as Subversion, create files or folders with names starting with a period. These files can
cause issues during deployment to Salesforce, so the Ant Migration Tool ignores them.
The Ant Migration Tool comes with a sample build.xml file that lists several deployment targets. You want to create your own
custom targets using the sample targets as starting points.
•
deployUnpackaged — Deploys unpackaged components specified in the target.
•
deployCode — Deploys the contents of the codepkg package specified in the target.
•
undeployCode — Deletes classes and triggers in the removecodepkg directory specified by the
destructiveChanges.xml manifest. This file is similar to package.xml, but lists components to be deleted. For more
information, see Deleting Files from an Organization on page 16.
•
deployCodeFailingTest — Deploys code that fails testing requirements, strictly for demonstration purposes.
•
deployCodeCheckOnly — Verifies that the deployment works, but doesn’t deploy any components.
Note: You can deploy or retrieve up to 10,000 files at once. AppExchange packages use different limits. In API version 43.0 and
44.0, AppExchange packages can contain up to 12,500 files. In API version 45.0, AppExchange packages can contain up to 17,500
files. In API version 46.0, AppExchange packages can contain up to 22,000 files. In API version 47.0 through 50.0, AppExchange
packages can contain up to 30,000 files. In API version 51.0 and later, AppExchange packages can contain up to 31,000 files.The
maximum size of the deployed or retrieved .zip file is 39 MB. If the files are uncompressed in an unzipped folder, the size limit is
400 MB.
•
If using the Ant Migration Tool to deploy an unzipped folder, all files in the folder are compressed first. The maximum size of
uncompressed components in an unzipped folder is 400 MB or less depending on the compression ratio. If the files have a
high compression ratio, you can migrate a total of approximately 400 MB because the compressed size would be under 39
MB. However, if the components can't be compressed much, like binary static resources, you can migrate less than 400 MB.
•
Metadata API base-64 encodes components after they’re compressed. The resulting .zip file can't exceed 50 MB, which is the
limit for SOAP messages. Base-64 encoding increases the size of the payload, so your compressed payload can't exceed
approximately 39 MB before encoding.
•
You can perform a retrieve() call for a big object only if its index is defined. If a big object is created in Setup and doesn’t
yet have an index defined, you can’t retrieve it.
Deploying Components
Note: The Ant Migration Tool is retired with Spring ’24. The tool continues to function for future API versions but isn’t updated
with new functionality and isn’t supported. To manage metadata changes, switch to Salesforce CLI for a modern, supported
developer experience.
You can deploy any set of components as a package or into your organization directly in the unpackaged package. The package used
is not determined by the build.xml target, but by the project manifest (package.xml). A sample deployment target follows:
<target name="deployUnpackaged">
<sf:deploy
username="${sf.username}"
21
Deploying ComponentsUsing the Ant Migration Tool