LibraryToggle FramesPrintFeedback

Bundle Tool (Bnd)

About the bnd tool

The Bnd tool is a an open source utility for creating and diagnosing OSGi bundles. It has been developed by Peter Kriens and is freely downloadable from the aQute Web site (subject to an Apache version 2.0 open source license). The key feature of the Bnd tool is that it automatically generates Manifest headers for the OSGi bundle, thus relieving you of this tedious task. The main tasks that Bnd can perform are:

  • Print the manifiest and show the package dependencies of a JAR file or bundle file.

  • Wrap a vanilla JAR file, converting it into a bundle.

  • Build a bundle from the class path, based on specifications in a .bnd file.

  • Validate manifest entries.

You have the option of invoking Bnd in any of the following ways: from the command line; as an Ant task; or through the Maven bundle plug-in, maven-bundle-plugin. In fact, the approach to building bundles described in Building with Maven is based on the Maven bundle plug-in and therefore, implicitly, is also based on the Bnd tool.

Downloading and installing bnd

You can download Bnd from the aQute Web site at the following location:

http://www.aqute.biz/Code/Download#bnd

Download the Bnd JAR file, bnd-Version.jar, to a convenient location. There is no installation involved: the JAR file is all that you need to use the Bnd tool. For convenience, however, it is advisable to rename the JAR file to bnd.jar, so you won't have to do so much typing when you invoke it from the command line (for example, as in java -jar bnd.jar Cmd Options)

References

To learn more about the Bnd tool, consult the following references:

Comments powered by Disqus