Community
Participate
Working Groups
Currently, it seems like the metadata resolution only happens against the repos defined in the .target. So if `includeSources=true` but defined repo don't contain source bundles, the resolved target platform won't contain even if those are available locally or on other know repos. As the typical use-case to request sources is for development, it would make sense, at least from the IDE, to not require metadata to add source bundles to target definition. Instead the resolution could simply get the source artifacts from all known repos, like implemented by P2TargetUtils.
New Gerrit change created: https://git.eclipse.org/r/94300
New Gerrit change created: https://git.eclipse.org/r/94301
I spent more time investigating this, and I am blocked by the fact that I do not find a way to retrieve an instance of the `RepositoryTracker` that's used by the p2 "Available Software sites" preference page. Any hint would be welcome!
Do you have a testing scenario I can use to see if I can find a solution?
IIRC, I did create my own test scenario. I built 2 p2 repos: one containing a dummy bundle without the source, and the other one containing bundle+source.bundle. Then put the URL for the non-source repo in .target and add the source repo to the known locations from p2 preferences. Loading the .target didn't make the source visible. However, I don't remember where I did place the test repos...