问题
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