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.
Retrieving Managed or Unmanaged Packages
Packages are useful for distributing related bundles of metadata across multiple instances or organizations, via Lightning Platform AppExchange. However, you can use the Ant Migration Tool to freely retrieve and deploy packaged metadata without using AppExchange. You retrieve both managed and unmanaged packages in the same way.
To retrieve a package, specify a packageNames parameter in the build.xml file. For example:
1<target name="retrieveNamedPackage">
2 <sf:retrieve
3 username="${sf.username}"
4 password="${sf.password}"
5 sessionId="${sf.sessionId}"
6 serverurl="${sf.serverurl}"
7 retrieveTarget="projectFolder"
8 packageNames="mySourcePackage"/>
9</target>