Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up a Jenkins job which uses the migration tool to move code from a source control system to an org. To test the job I created a new custom object named aaaTest__c. I changed my package.xml to the following:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="">

When my Jenkins job runs I see 1160 components that failed to deploy. These include objects, workflows, triggers, classes and more. The object errors appear to be for the custom fields on that object. The errors all look like this:

workflows/Account.workflow (Account.Test_Task) -- Error: Not in package.xml

I don't understand why the migration tool is trying to deploy all of these components when I'm telling it just deploy one. Any help will be greatly appreciated.

share|improve this question
up vote 3 down vote accepted

The migration tool does little more than to zip the directory, then send it through the the metadata API. In other words, it's not exceptionally "smart." You'll probably want to build some scripts to move all files not explicitly mentioned into a temp directory so that the resultant zip file won't include non-included components, or at least build a script that attempts to pull a fresh directory based on your package file, then deploy that new directory. This is the technique I'm using until I finish my new toolkit. It gives me the ability to do this:

ant pkg:account from:dev1 retrieve to:env1 copy deploy

From, to, and pkg targets set script variables, while retrieve, copy, and deploy targets use those variables to do specified actions. Each environment gets its own directory, so copy just recursively copies one folder to the other.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.