Rob Anderson
Rob Anderson

Reputation: 2407

OSGi: Having the same Package path in two different Bundles

I got a bundle1 that has the following packages:

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

and a second one, bundle2, that looks like this:

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

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

Is it possible to merge both packages in bundle2?

Upvotes: 4

Views: 2741

Answers (1)

Neil Bartlett
Neil Bartlett

Reputation: 23948

No. If you import a package, that takes precedence over a private package with the same name that you may happen to have inside your bundle.

Why not just rename the private package in bundle2?

Upvotes: 2

Related Questions