mangen adds 'Bundle-ManifestVersion: 1' to manifest, but felix doesn't seem to accept value 1

隐身守侯 提交于 2019-12-25 04:07:24

问题


I've used 'Mangen' to process my jar, which works but it adds the next line to the manifest

Bundle-ManifestVersion: 1

after which Felix 1.8.0 complains with

-> install file:D:/bundles/osgi_ds_1.jar.new.jar
org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value: 1
        at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:56)

If I change the version manually to 2, Felix does install without error. But even if the manifest already contained Bundle-ManifestVersion: 2, mangen changes it to 1

Any ideas are welcome


回答1:


The Mangen tool you refer to seems to be a bit outdated (last release in June 2005).

I would suggest that you try to use Bnd tool written by Peter Kriens instead. It serves for automatic generation of OSGi bundle manifests as well. It's also integrated into a Maven plugin -- see Bundle Plugin for Maven.



来源:https://stackoverflow.com/questions/1244226/mangen-adds-bundle-manifestversion-1-to-manifest-but-felix-doesnt-seem-to-a

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