OSGI - handling 3rd party JARs required by a bundle

前端 未结 6 1816
感情败类
感情败类 2020-12-02 12:07

I\'m just getting started with OSGI development and am struggling to understand how best to handle dependant JARs.

i.e. if I\'m creating a bundle the likelyhood is t

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 13:07

    It is possible to embed non-OSGi dependencies into the bundle.

    An easy way to do this is to use Maven to manage your dependencies and Maven Bundle Plugin to build your bundle. Take a look at the and instructions of the Maven Bundle Plugin described in the section Embedding dependencies of the plug-in documentation page.

    As Roland pointed out this is not an ideal solution with respect to the intentions of OSGi, i.e. modularization and reuse of individual modules. However it might be pragmatic solution for time being until the 3rd-party dependencies can be converted into OSGi bundles.

提交回复
热议问题