Find your content:

Search form

You are here

Migration Tool: Build failure because of dependencies

 
Share

I just deployed code using the Migration Tool, including a new Public Group and some other objects (report folder, list view, etc.) that were shared out to that group:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

    <types>
        <members>My_New_Team</members>
        <name>Group</name>
    </types>

    <!-- Other objects -->

    <version>26.0</version>
</Package>

My build failed, and I kept getting an error that the group couldn't be found, causing the other object deployments to fail. Eventually I added the group first (in a separate deployment), and then re-deployed and the migration succeeded.

My question is: Why did this happen, and is there anything I can do to help the migration tool correctly resolve dependencies so that it deploys the group first?


Attribution to: Benj

Possible Suggestion/Solution #1

Based on my experimentation and testing, the migration tool inserts objects in the order they're listed in package.xml. If you have dependencies within your project, be sure to list them in order!


Attribution to: Benj
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/5106

My Block Status

My Block Content