Search code examples
javaosgimanifest.mfapache-felix

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


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


Solution

  • 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.