function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Thomas LettieriThomas Lettieri 

Deploying using migration tool

I just started using the migration tool and got the custom object retrieval working fairly quickly.  The problem is when I go to deploy I get an error on every fields and an All field that is not a field of the object 

Here is the error:
All Component Failures:
1.  objects/My_Object__c.object (My_Object__c.My_Field__c) -- Error: Not in package.xml
2.  objects/My_Object__c.object (My_Object__c.All) -- Error: Not in package.xml


Here is package.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>z87__My_Object__c</members>
        <name>CustomObject</name>
    </types>
    <version>36.0</version>
</Package>


 
Best Answer chosen by Thomas Lettieri
Thomas LettieriThomas Lettieri
I found the problem...  I was changing the package.xml of the output and correcting that so on retrieve it would revert...  I don't understand why there are two identical package.xml's but i fixed the issue

Anyway positive points to take out of this are:
don't put your namespace in your package.xml....

All Answers

Thomas LettieriThomas Lettieri
I found the root of the problem, if i remove the namespace form package.xml it is fine....   However every time I run retrieve it reverts package.xml it adds the namespace back in.  How do i keep it from touching package.xml on retrieve
Thomas LettieriThomas Lettieri
I found the problem...  I was changing the package.xml of the output and correcting that so on retrieve it would revert...  I don't understand why there are two identical package.xml's but i fixed the issue

Anyway positive points to take out of this are:
don't put your namespace in your package.xml....
This was selected as the best answer
john harvey 2john harvey 2
Hi Thomas, Did you fin the solution to this issue? I am getting the same error.
Thomas LettieriThomas Lettieri
I was having a couple of problems
1.) it does not like it when you put your specific namespace in the package.xml
2.) It makes a copy of your package xml so if you fix your package xml make sure you are changing the original not the output

Let me know how it goes or any additional details if thats not your problem
john harvey 2john harvey 2
So here what I am trying to do is deploy certain components from the package.xml I have configured using force.com ide but the directory has more than what package.xml contains and it gives me error for this child objects and every other component saying not in package.xml
Thomas LettieriThomas Lettieri
more than what package.xml contains?
if you can maybe post your package xml that might help, also make sure your build file points at the correct directory for package xml
john harvey 2john harvey 2
So actually my package.xml only contains one class to deploy.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>AddressClass</members>
        <name>ApexClass</name>
    </types>
    <version>36.0</version>
</Package>

but my local directory contains everything from my other sandbox. So while deploying using this package.xml I get error saying not in package.xml for eveyother component.
john harvey 2john harvey 2
I did find that ANT does not allow keeping the components other than package.xml in the same directory as package.xml. But I am out of options.
 
Thomas LettieriThomas Lettieri
Does that apex class talk about an object or field that does not exist on production?  When i deploy classes and triggers I use changesets, i used this for schema migration
john harvey 2john harvey 2
No, I retrieved it from the same org and trying todeploy in the same org but with some extra component being the same local directory. I really appreciate your time Thomas. I guess I will have to figure out some other way.
Thomas LettieriThomas Lettieri
It looks like the snippet you sent was from the output package xml not the input.  When i created my package xml i did not include the version 36 and the output would generate that
john harvey 2john harvey 2
Yes that package.xml has been constructed by force.com IDE and I wanted to use the same but due to there are other classes exists in the same directroy it is giving error for those classes that error: Not in package.xml. I am actually figuring out a way to integrate TFS and ANT migration tool