Hi,

I'm developing a bundle which provides an abstract class called
"AbstractBundle". Such class uses DS annotation over abstract methods, like:

@Deactivate
public abstract void deactivate();

This leads to the fact that the class imports classes from
"org.osgi.service.component". I want to declare this abstract class mainly
for allowing developers to automatically implements some important DS
methods and for documentation purposes.

The generated bundles has the correctly Import-Package entry
(org.osgi.service.component;version="[1.3,2)"). However, when I try to test
its installation in a "KarafTestSupport" derived class (where in the config
i install the SCR feature via:

KarafDistributionOption.features("standard", "scr")

karaf still complaints about the missing reference. here the error:

org.apache.felix.resolver.reason.ReasonException: Unable to resolve root:
missing requirement [root] osgi.identity; osgi.identity=FOO;
type=karaf.feature; version=0;
filter:="(&(osgi.identity=FOO)(type=karaf.feature)(version>=0.0.0))"
[caused by: Unable to resolve FOO/0.0.1: missing requirement [FOO/0.0.1]
osgi.identity; osgi.identity=FOO; type=osgi.bundle;
version="[0.0.1,0.0.1]"; resolution:=mandatory [caused by: Unable to
resolve FOO/0.0.1: missing requirement [FOO/0.0.1] osgi.wiring.package;
filter:="(&(osgi.wiring.package=org.osgi.service.component)(version>=1.3.0)(!(version>=2.0.0)))"]]

Note that I install the artifact exposing class AbstractBundle via a karaf
feature.

Am I doing something which is invalid?

Thanks for any kind reply

-- 
*Ing. Massimo Bono*

Reply via email to