OSGi: Having the same Package path in two different Bundles

断了今生、忘了曾经 提交于 2019-12-22 08:55:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!