2

Are there plans to support "Require-Bundle" in maven-bundle-plugin, even if its not the recommended OSGi way. There are situations where it makes sense to use "Require-Bundle", for example to merge split packages.

4

2 回答 2

5

Require-Bundlebundle-plugin 支持,就像所有 OSGi 标头以及您要使用的任何其他任意标头一样。只需将它们写在 XML 中:

<Require-Bundle>
    org.example.foo; bundle-version=3.0,
    org.example.bar; bundle-version=1.0
</Require-Bundle>
<My-Extension-Header>
    blah blah blah
</My-Extension-Header>
于 2014-12-24T19:02:34.173 回答
0

您可以在说明中指定 Require-Bundle MANIFEST 标头。例如:

<instructions>
    <Require-Bundle>a.b.c</Require-Bundle>
</instructions>

但是,所需捆绑包的版本范围不会自动附加,因此如果需要,您必须手动指定它。

于 2014-12-22T12:02:22.767 回答