Hi I am trying to fetch the classes, triggers and visualforce pages in our salesforce org using the ant tool but it ends up fetching the managed package metadata as well. The metadata api doesnt seem to have this problem (based on using mavensmate which does not fetch any managed package metata)/

tried both sf:bulkRetrieve and sf:retrieve but they all end up fetching the metadata from managed package as well.

is there any way to exclude managed packaged metadata ?

(similiar problem has been asked here as well >> Using sf:bulkRetrieve do not fetch metadata components associated with a managed package)

1 Answer 1


One possible solution is by following the below steps :

  1. Use sf:listMetadata task of Force.com migration tool to retrieve the information of all items(including managed package) of any specific metadata type.

  2. Use a script, may be a generic java program to filter out the required items from the list above. We will get the names of final list of components of any metadata type using this step.

  3. Now finally using the final list in package.xml and use sf:retrieve task of Force.com migration tool.

Using this approach you can retrieve the metadata components without much manual intervention from your Salesforce org and that too in no time.

You can check out the below link for more details: Retrieve list of components of any metadata type from a managed package

For your use case , in the generic properties.file , you can simply change the setting includePackage from true to false.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .