Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 osgi 项目中,我有 maven-bundle-plugin 以及导入某些路径的说明,例如:org.blah.blah。* 我还有另外两个导出此类包的包。如何配置我的包以从他们两个导入 org.blah.blah.*?
您不能从多个捆绑包中导入给定的包名称。您可以做的是 Require-Bundle 这两个捆绑包,这将使您的捆绑包可以作为拆分包访问这两个包,并具有拆分包和 Require-Bundle 的所有固有问题。请参阅 OSGi Core Release 5 规范中的 3.13.3。
更好的是重构(如果可以的话)以避免拆分包。