如何用Bnd创建一个osgi片段?(How to create an osgi fragment with Bnd?)

编程入门 行业动态 更新时间:2024-10-25 01:33:23
如何用Bnd创建一个osgi片段?(How to create an osgi fragment with Bnd?)

今天我深入了解了Eclipse的bndTools 。 我有一个好的开始,但我问自己是否可以使用bndTools或bnd创建osgi碎片。 从bnd项目描述中可以看出,bnd忽略了Fragment-Host头部,但还没有发现这意味着什么。

有人知道是否可以用bnd创建一个osgi片段,如果可以的话该怎么做?

问候马库斯

Today I had a deeper look inside the bndTools for Eclipse. I had a good start, but I ask myself if it is possible to create osgi fragments with bndTools or bnd. From the bnd project description it tells me that the Fragment-Host header is ignored by bnd, but have not found out what this means.

Does someone know if creating a osgi fragment is possible with bnd, and if so how to do that?

Regards Markus

最满意答案

一个片段包只有两种特殊的方式:

它不能启动,所以它不应该包含一个Bundle-Activator头,并且 它需要包含一个带有要附加到的主机的符号名称的Fragment-Host头。

除此之外,它与其他任何软件包一样,所以bnd不需要以任何特殊的方式处理它。 bnd默认'忽略'它不识别的所有头文件,在这种情况下,它逐字地将它们复制到结果包的清单中。

在Bndtools中,您可以在Source选项卡中添加自定义标题(即,那些不受Bndtools直接支持的标题)。

A fragment bundle is special in only two ways:

it cannot be started, so it should not contain a Bundle-Activator header, and it needs to contain a Fragment-Host header with the symbolic name of the host you want to attach to.

Other than that, it's a bundle like any other, so bnd does not need to handle this in any special way. bnd by default 'ignores' all headers it doesn't recognize, in which case it copies them verbatim to the resulting bundle's manifest.

In Bndtools, you can add custom headers (i.e., those not directly supported by Bndtools) in the Source tab.

更多推荐

本文发布于:2023-07-20 02:56:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1192084.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:创建一个   如何用   片段   Bnd   osgi

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!