BramCoding
BramCoding

Reputation: 395

OSGi: how to properly install a resolution answer Map<Resource,List<Wire>>?

Hello and good evening,

I have been experimenting a bit with OSGi using Eclipse IDE and the Bndtools plugin.

I made a bundle and created a Component in a package of the bundle. I made my own ResolveContext in that Component and made sure that the Resolver would be able to solve my problem.

When calling the Resolver.resolve(ResolveContext)-method, a Map<Resource,List<Wire>> is returned in case of a solution found.

In my case, I manipulated the problem so that only 1 Resource/Bundle has to be installed, but I don't really understand the answer I am getting from the Resolver.

I am getting back a Map with 2 entries:

1): org.bram.package.MyComponent$2@10c23f49 [org.bram.package.MyComponent$1@792102f3 -> [org.organisation.types.domotics version=0.12.1]]

2): org.organisation.types.domotics version=0.12.1=[]

Note that org.bram.package.MyComponent is the Component which I have made and where the Resolver is used in. The naming of the Resources is not important, I just don't really get what this answer means and how to act on it.

To make this resolution complete, should I simply install the bundle org.organisation.types.domotics version 0.12.1 (which I can get from my Repositories)?

If more information is needed, please ask and I will try to provide it in as much detail as possible.

Thank you

Upvotes: 0

Views: 54

Answers (1)

Christian Schneider
Christian Schneider

Reputation: 19626

You did not specify the requirements you initially put into the resolver as well as the repository. So it is a bit hard to tell.

What I assume is that you put the bundle of MyComponent as a requirement into the resolve process and it tells you that you need to install your bundle as well as the domotics types bundle to achieve a closure.

Upvotes: 1

Related Questions