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 Unpackaged Components
The unpackaged package contains all of the standard objects, custom objects, Apex classes and other metadata components that exist natively in your organization, and not within a package. To retrieve unpackaged components, use a build.xml target that contains the unpackaged attribute that points to a package.xml file. For example:
1<target name="retrieveUnpackaged">
2 <mkdir dir="projectFolder"/>
3 <sf:retrieve
4 username="${sf.username}"
5 password="${sf.password}"
6 sessionId="${sf.sessionId}"
7 serverurl="${sf.serverurl}"
8 retrieveTarget="projectFolder"
9 unpackaged="unpackaged/package.xml"/>
10</target>The salesforce-ant.jar file contains Ant tasks for accessing the Metadata API. In the code above, sf:retrieve is an Ant task. The full list of metadata Ant tasks are described in the Metadata API Developer Guide.