Resolution of my project works when I use a repository which is initialized using downloaded jars. The resolution fails when I serialize this repository using the XML Repository Format and then use a new repository initialized by deserializing the XML.
Steps to reproduce:
1 Initialize a repository (aQute.bnd.osgi.repository.ResourcesRepository to be specific) from jars, using ResourceBuilder.addFile and then ResourceRepository.add
2 Try resolution of some sample project, works as expected
3 Serialize respository to XML
4 Initialize a repository from the serialized XML
5 Try resolution of sample project using the latter repository, fails unexpectedly.
The reported problem is (only the first is shown):
Expected behavior:
Serializing/deserializing should not have an impact on successful resolution.
Note: I thought that I had identified the root cause with #6211. But according to the comment, the information that my workaround restores should not be (or does not need to be) restored. So there must be some other cause for the failing resolution.
One possible cause (just guessing) could be that the requirement in namespace bnd.multirelease should not be there in the first place. Here's the resource definition created by bnd for jackson-core, you can find the requirement at the bottom:
The requirement does not cause problems when the repository is initialized from jars, because this creates the bnd.multirelease capabilities. However, these capabilities are not restored when deserializing the repository XML (unless I use my workaround).
Problem:
Resolution of my project works when I use a repository which is initialized using downloaded jars. The resolution fails when I serialize this repository using the XML Repository Format and then use a new repository initialized by deserializing the XML.
Steps to reproduce:
1 Initialize a repository (
aQute.bnd.osgi.repository.ResourcesRepository
to be specific) from jars, usingResourceBuilder.addFile
and thenResourceRepository.add
2 Try resolution of some sample project, works as expected 3 Serialize respository to XML 4 Initialize a repository from the serialized XML 5 Try resolution of sample project using the latter repository, fails unexpectedly.The reported problem is (only the first is shown):
Expected behavior:
Serializing/deserializing should not have an impact on successful resolution.
Note: I thought that I had identified the root cause with #6211. But according to the comment, the information that my workaround restores should not be (or does not need to be) restored. So there must be some other cause for the failing resolution.
One possible cause (just guessing) could be that the requirement in namespace
bnd.multirelease
should not be there in the first place. Here's the resource definition created by bnd for jackson-core, you can find the requirement at the bottom:The requirement does not cause problems when the repository is initialized from jars, because this creates the
bnd.multirelease
capabilities. However, these capabilities are not restored when deserializing the repository XML (unless I use my workaround).