The Maven JBI plugin is a simple Maven 1.x plugin that can be used to generate a JBI component installer for a maven project.

The plugin is available here and you can install is by dropping it into your Maven installations plugins directory using $MAVEN_HOME/plugins. It is also available from Service Mix CVS under tooling/maven-jbi-plugin.

Once you have installed the plugin you can then configure your project, first up you need to identify the Component class and the Bootstrap class. This can be done by adding the following to your project.properties.

#------------------------------------------------------------------
# J B I   I N S T A L L E R    P R O P E R T I E S
#------------------------------------------------------------------
jbi.component.class.name=org.servicemix.components.dummy.DummyComponent
jbi.bootstrap.class.name=org.servicemix.components.dummy.DummyBootstrap

Note that if your component has dependent libraries you can specify that you wish to have these bundled with your component, and therefore referenced in your jbi.xml.

<dependency>
  <id>quartz</id>
  <version>1.4.5</version>
  <properties>
     <jbi.bundle>true</jbi.bundle>
  </properties>
</dependency>

Once you have configured these settings you can then execute the generateInstaller goal by running the following Maven goal:

maven jbi:generateInstaller

This will create an installer for your project in target\ directory under your project. If you usual jar output is myproject-1.0.jar, then the installer will be myproject-1.0-jbi-installer.zip.

  • No labels