OSGi: having the same package path in two different packages

I got bundle1 , which has the following packages:

 com.anderson.servlet.osgi (exported) com.anderson.servlet com.anderson.util (exported) 

and the second, bundle2 , which looks like this:

 com.anderson.jetty com.anderson.servlet.osgi 

and I also import com.anderson.servlet.osgi from bundle1 .

Is it possible to combine both packages in bundle2 ?

+4
source share
1 answer

No. If you import a package that takes precedence over a private package with the same name that may occur inside your package.

Why not just rename the private package in bundle2?

+2
source

All Articles