Maven Bundle Plugin

This Maven 2 plugin is based on the BND tool from Peter Kriens. The way BND works is by treating your project as a big collection of classes (e.g., project code, dependencies, and the class path). The way you create a bundle with BND is to tell it the content of the bundle's JAR file as a subset of the available classes. This plugin wraps BND to make it work specifically with the Maven 2 project structure and to provide it with reasonable default behavior for Maven 2 projects.

Goals Overview

General Information about the goals.

  • bundle:bundle Create an OSGi bundle from Maven project. (life-cycle goal)
  • bundle:manifest Generate an OSGi manifest for this project.
  • bundle:cleanVersions Convert a group of versions to OSGi format.
  • bundle:instructions Generate BND instructions for this project.
  • bundle:install Installs bundle details in the local OBR repository. (life-cycle goal)
  • bundle:deploy Deploys bundle details to a remote OBR repository. (life-cycle goal)
  • bundle:index Index the content of a maven repository using OBR.
  • bundle:install-file Installs bundle details in the local OBR repository. (command-line goal)
  • bundle:deploy-file Deploys bundle details to a remote OBR repository. (command-line goal)
  • bundle:clean Clean a local OBR repository by finding and removing missing resources.
  • bundle:remote-clean Clean a remote OBR repository by finding and removing missing resources.
  • bundle:ant Generate Ant script to create the bundle. (you should run ant:ant first)

Usage

General instructions on how to use the Maven Bundle Plugin can be found on the wiki page. Some more specific use cases are described in the examples given below.

In case you still have questions regarding the plugin's usage, please have a look at the FAQ and feel free to contact the user mailing list. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the mail archive.

If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our issue tracker. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our source repository and will find supplementary information in the Apache Felix developers guide.

Examples

To provide you with better understanding on some usages of the Maven Bundle Plugin, you can take a look into the following examples:

  • Examples coming soon!