Bundle-A:
FooA.java
package com.foo.a;
import com.foo.b.FooB;
class FooA {
FooB b = new FooB();
}
Bundle-B:
FooB.java:
package com.foo.b;
import com.foo.c.FooC;
class FooB {
public FooC foo() {
...
}
}
Bundle-C: ...
So in short, I have 3 bundles - A, B and C.
Bundle A references bundle B directly, and Bundle B references C. As you see, FooA doesn't use the method in FooB that returns FooC, so FooC is not referenced in bundle A directly.
Why is BND including the OSGi import-package to com.foo.c then? The way I understand it - bundle A only needs bundle B in order to be able to resolve itself. Bundle B on the other hand needs C. But why should A require C directly, if it's not used there?