问题
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
?
回答1:
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?
来源:https://stackoverflow.com/questions/13991860/osgi-having-the-same-package-path-in-two-different-bundles