stephan f
stephan f

Reputation: 622

Validate OSGi Manifest

What's the best way to parse and validate an OSGi manifest file? I've got a bunch of MANIFEST.MF files and there's a syntax error in one of them. What's the best tool to do this? I'd rather not have to load all the bundles into Eclipse to find the problem.

Upvotes: 5

Views: 2124

Answers (2)

Lindsay Smith
Lindsay Smith

Reputation: 115

Spring also has manifest parsing and editing files in their libraries - the class is com.springsource.util.osgi.manifest.BundleManifest.

Upvotes: 1

Riduidel
Riduidel

Reputation: 22300

Seems like BND tool can provide such manifest checking, but I'm not sure how ...

OK, According to the command line page, you can do a

 bnd print -verify *.jar

to check jar validity.

Besides, are your bundles not built in Eclipse world, I recommend you to create them using the excellent Felix bundle plugin which is in fact a wrapper around the aforementionned BND.

Upvotes: 3

Related Questions