package.xml is not being retrieved
When we run the metadata retrieval (module or project) it does not show package.xml to merge:
Like it does not exist in Salesforce.
It means that no matter what we do locally or in Salesforce package.xml is out of sync.
Version 1.8.1.1-idea14
Comments (10)
-
repo owner -
reporter That was quick as always, thank you Scott! Let me digest and try those things. Quick question - how do I check if metadata subscription is based on package.xml or something else (what is that option? is there some documentation?). Thanks!
-
repo owner Just go to Illuminated Cloud>Configure Module and it's whichever radio button you've chosen, either All/Package, Package.xml, or Selected. I will be crashing for the evening very shortly but can continue this discussion tomorrow once you've had time to digest.
-
reporter So, I tried to set All/Package:
It does not see package.xml on retrieval.
It's now also showing a lot stuff (fields, actions) for Account, Lead, Contact, Opportunity that is not related to the package itself.
-
repo owner I should have pointed out that you don't want to use All/Package. I've thought about removing that altogether but there are some folks who use the All side, and the Package side is useful if you're developing managed packages. If you're maintaining a
package.xml
file you should choose Package.xml and point it at yourpackage.xml
file. IC will not include the retrievedpackage.xml
in the directory diff, though. It wouldn't merge into your local, hand-crafted one well. To help maintain that you should use Add to Metadata Selection when you've added new files into your local filesystem. -
reporter So, I created a Node_Test field via Salesforce UI, added it to the package. I'm trying to update now my local metadata files (including package.xml). It's set to use
src/package.xml
. When I try to sync it does not pull the field description into the Account's metadata file. It does not pullpackage.xml
(that is expected, as far as I understand). -
repo owner If you're using a Package.xml subscription you need to add the new field to your hand-crafted
package.xml
file and then click the Refresh button in the retrieve dialog. Alternatively when you retrieve you can change Contents to Custom and uncheck Subscribed Only, then click Refresh and it'll show up in the list for retrieval. Either way you have to give IC some notion of your intention to include it in the retrieval selection. Let me know if that doesn't make sense. -
reporter Yes, it makes sense. It's a little bit complicated though. I expected for it to have a single action to retrieve new objects. But anyway, I understand that not retrieving the
package.xml
is not a bug. Thank you for your help. -
repo owner - changed status to resolved
Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment
So here's the deal with
package.xml
during retrieval...IC actually removes it from the downloaded content under the following circumstances:package.xml
file included in the retrieved metadata package would itself represent that subset.package.xml
file. It's removed in this situation because IC generates its ownpackage.xml
file for the retrieval to ensure that wildcards in your localpackage.xml
file don't accidentally result in way more metadata being included in the retrieval than intended/expected.When IC originally did retain the retrieved
package.xml
file in both of these situations, users accidentally overwrote local, carefully hand-craftedpackage.xml
files with the retrieved on and lost changes (yes, those files should have been under version control, but that's not always the case). As a result, based on feedback from users I changed things to work the way they do today.Note that IC does support updating your local
package.xml
file based on the metadata files in the filesystem using the Add to Metadata Subscription action. After pulling the metadata you want from your org, if you're configured for a Pacakge.xml metadata subscription, you should be able to run that action on your source root and IC will add any new files to the respective clauses. It'll even respect wildcards, though it won't create them for you.So that's more of an explanation of how things work now and why they work that way. I'm happy for this to be just one step in a dialog on how you might like to see that change based on your particular workflow needs.