PDA

View Full Version : equinox & Import-Package: resolution:=optional


Peter Joosten
May 4th, 2008, 06:50 AM
I am using Apache MyFaces JSF Implementation 1.2.2 from the SSE bundle repository. The bundle has an optional dependency on com.google.inject.

From MANIFEST.MF:
Import-Package: com.google.inject;version="[1.0.0, 2.0.0)";resolution:=optional

Class org.apache.myfaces.el.unified.resolver.GuiceResolv er has an import statement of class com.google.inject.Injector.

I am using the equinox 3.3.2 as OSGi framework (Yes 3.3.2, not 3.2.2).

From the Console:
osgi> diag 21
initial@reference:file:com.springsource.org.apache .myfaces-1.2.2.jar/ [21]
Missing imported package com.google.inject_[1.0.0,2.0.0).
Missing imported package org.apache_[6.0.16,7.0.0).

Questions:
- From this I assume that the option "resolution:=optional" is not supported by equinox. Is this correct?
- Is this a standard OSGi option (maybe OSGi 4.1) or an SSE extension ?
- Is there a configuration option for the equinox framework that can turn on/off the support for optional dependencies?
- Is this option supported by one of the other open source OSGi frameworks?

Greetings,
Peter Joosten

Peter Joosten
May 4th, 2008, 07:37 AM
Using Google I found from http://www.aqute.biz/Code/BndHibernate: The OSGi specification recognizes a directive on an Export-Package clause, called resolution. This directive can be optional or mandatory (the default).

I realize (maybe) I am being a little lazy. I will investigate into this myself next week. However if someone has a quick answer it will be appreciated.

adreghiciu
May 4th, 2008, 08:40 AM
However if someone has a quick answer it will be appreciated.

Peter,
Check out OSGi core specs section 3.6.3. You wil find anything you need about this subject.

Alin

Peter Joosten
May 4th, 2008, 07:51 PM
Forget my questions on the previous post. I must have had a temporary mental lapse. Alin thanks for your advice. I should read up on the subject.

Peter