Archive for the 'manifest' Category

Manifest reader in Ruby

Manifest files are incorporated in jar files to help describe them.
In the OSGi world, they have a critical mission: describe the OSGi bundle that the jar becomes, giving its name, its transitive dependencies and its execution parameters.

I initiated some time ago a project named Manifest in Rubyforge, licensed under the Apache 2 License.
Assaf helped put some meat on the bones with his reader used in the Buildr tests (source, around line 41).
I added some more code to parse the OSGi attributes. For example, when you parse the org.eclipse.compare plugin, you can query it like this:

manifest.sections.first["Require-Bundle"]["org.eclipse.core.expressions"]["bundle-version"]

This returns "[3.3.0,4.0.0)".

The first release is tagged 0.0.1, and you can install it with rubygems:

gem install manifest