[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] Re: Bundle dependencies

Maurizio wrote:
Dear Henrik,
Thanks very much for your reply.
I'm not requiring bundles in source format. Only installed bundles, at this moment.
I understand that there are API to inquiry their dependencies, but I was wondering if I could access their manifest, where the "Require-Bundle" should be explicit mentioned and so I can download or install any other bundle that is required.


To make an example, I started downloading a tutorial for using Server-Side Equinox from javaworld website: com.javaworld.sample.osgi.web.declarative. The manifest indicated explicitly "Require-Bundle: org.eclipse.equinox.http.registry", and so I downloaded such bundle before starting my example. The point is that such bundle seems to require "org.eclipse.equinox.registry", and I didn't know that until I started my declarative bundle.
In this case, having the possibility to access the manifest for the bundle that I downloaded (org.eclipse.equinox.http.registry) whould have done the job that I was looking for.


Does all this make sense?
Am I following an incorrect approach?

I think you should take a closer look at p2. It sounds like you really want to install everything that is required - and this is exactly what p2 does for you. It takes everything you have installed into account, as well as everything in known repositories, solves dependencies and requirements and executes the installation.

Looking at "required bundle" is not enough, you must also handle package imports, and in some cases you may also need to search for fragments in order to find a working configuration. Filters and constraints in installed features and plugins must also be taken into account. If you try this on your own, you will find that it quickly snowballs on you and eventually you will end up reimplementing the capabilities in p2.

If all you want to do is view the list of required bundles for things in your workspace/IDE, then the Buckminster component view is one way of displaying them. The Buckminster view works in earlier Eclipse versions as well. (I am sure there are other ways of finding the dependencies, but the Buckminster component view is what I usually use for a quick look).

Regards
- henrik