在bndtools中,是什么导致生成执行环境的Require-Capability标头?

时间:2014-09-15 15:37:30

标签: osgi bnd bndtools

我有以下的bnd文件:

Bundle-Version: 1.0.12
Bundle-Activator: a.b.Activator
Private-Package: a.b
-buildpath: osgi.core;version=4.3.0,\
    org.apache.felix.bundlerepository;version=1.6.6,\
    osgi.cmpn;version=4.3.0.201111022214
-sources: false

在生成的MANIFEST.MF中:

Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"

我不想在那里......我没有理由看到它应该是。那我该如何避免呢?

1 个答案:

答案 0 :(得分:11)

bnd 2.3会自动添加此项。您可以在bnd文件中使用-noee=true停用。

通常,这是一个很好的要求,因为它表达了捆绑包的基本JRE要求。 bnd根据包中的类文件版本确定版本。