Newer Version Available
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.