在 bndtools 中,是什么导致生成执行环境的 Require-Capability 标头? [英] In bndtools, what causes a Require-Capability header for execution environment to be generated?

查看:73
本文介绍了在 bndtools 中,是什么导致生成执行环境的 Require-Capability 标头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下 bnd 文件:

I have the following bnd file:

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 中:

In the generated MANIFEST.MF:

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

我不想要这个......我没有理由认为它应该是.那么我该如何避免呢?

I don't want this there... there's no reason I can see that it should be. So how do I avoid it?

推荐答案

bnd 2.3 自动添加了这个.您可以在 bnd 文件中使用 -noee=true 禁用.

bnd 2.3 automatically adds this. You can disable with -noee=true in your bnd file.

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

Generally this is a good requirement to have since it expresses the base JRE requirement of your bundle. bnd determines the version based upon the class file versions in the bundle.

这篇关于在 bndtools 中,是什么导致生成执行环境的 Require-Capability 标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆