In bndtools, what causes a Require-Capability header for execution environment to be generated?

帅比萌擦擦* 提交于 2020-12-30 06:52:15

问题


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

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?


回答1:


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

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.



来源:https://stackoverflow.com/questions/25851771/in-bndtools-what-causes-a-require-capability-header-for-execution-environment-t

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!