What is the best way of grouping OSGi bundles to make a coherent 'application'

前端 未结 3 593
暖寄归人
暖寄归人 2021-02-14 03:24

The \"OSGi way\" is to develop separate bundles containing discrete, coherent pieces of functionality. Sometimes these bundles contain utility classes, sometimes they depend on

3条回答
  •  Happy的楠姐
    2021-02-14 04:16

    If you use a resolver such as OBR or the new R5 resolver then using Import-Package does not necessarily create a large maintenance overhead.

    However, the Require-Bundle way is also possible. An "application" typically consists of a small number (say, 1-5) "interesting" bundles. Then there are all the rest such as dependencies, SCR, Blueprint, etc. You could therefore create a single top-level Application bundle that uses Require-Bundle to refer to the small set of interesting bundles, and then all other dependencies are specified with Import-Package.

提交回复
热议问题