Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

JBI logically separates Binding Components and Service Engines as two flavours of a component, the Maven JBI tooling provides that you can define a project as a jbi-component and then specify whether it is a service-engine or binding-component. Like the shared libraries we have just covered the definition of a jbi-component firstly requires the steps from Getting Started (plugin repositories and plugin) and then it also requires you change the packaging of your project.

...

type - whether this is a binding-component or a service-engine
bootstrap - the name of the class that will be your bootstrap implementation
component - the name of the class that will be your component implementation

Tip
titleUsing a Default Bootstrap

Often when you build a new component you don't need the bootstrap class and end up simply having to create a class to fulfill the specification. However, with the Maven JBI tooling you can simply not specify a bootstrap in your configuration for the plugin and the plugin will copy the DefaultBootstrap from the servicemix-common project (which basically just implements the interface) into you project and will correctly reference this in the jbi.xml. This is because the service-common shared-library is not available to the classloader for bootstrapping.

Once you have configured these steps you can run mvn install and much like the shared library maven will create both a standard jar and also a component installer.  If you have a locally running Apache ServiceMix instance (which its default settings) you can even use the plugin to install the Component by simply typing:

...