今天我深入了解了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.
更多推荐
发布评论