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
sean*harrisonsean*harrison 

not in package.xml

Question about the Ant Migration Tool: I'm working on an unpackaged project and wish to deploy a subset of files regularly to another sandbox. To this end I have a package.xml specifying just those components. When I run the build I get a number of "Error: ...:Not in package.xml" messages, one for each metadata file in the deployRoot that isn't listed in package.xml.

 

I want the migration tool to just ignore those and pay attention to the package.xml. Am I missing a command attribute somewhere?

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

Every file in the deployRoot must be in package.xml. Remove any unused files from the folders. Yes, it is annoying... but it is what it is.

All Answers

sfdcfoxsfdcfox

Every file in the deployRoot must be in package.xml. Remove any unused files from the folders. Yes, it is annoying... but it is what it is.

This was selected as the best answer
sean*harrisonsean*harrison

Mmmm...that is annoying. For what it's worth, I created another package.xml elsewhere with symbolic links to the files I want. I run ant against that and all is happiness and light again.

niristotle okramniristotle okram
Is this is a recommended way of development in SFDC? So, i have the main dev branch, and while creating the feature branch everything from the dev comes in the new feature branch. Not if i have to work and deploy only one say, Apex class... The Salesforce recommends to delete everything from the src and package.xml, and leave only the class that i am working in both the package.xml + the file?