LibraryLink ToToggle FramesPrintFeedback

Chapter 6. Building JBI Components using Maven

FUSE ESB provides Maven tooling that simplifies the creation and deployment of JBI artifacts. Among the tools provided are:

The FUSE ESB Maven tooling also includes plug-ins for creating service units and service assemblies. However, those plug-ins are outside of the scope of this book.

In order to use the FUSE ESB Maven tooling, you add the elements shown in Example 6.1 to your POM file.


These elements point Maven to the correct repositories to download the FUSE ESB Maven tooling and load the plug-in that implements the tooling.

The FUSE ESB Maven tooling provides a number of archetypes that can be used to seed a JBI project. The archetype will generate the proper file structure for the project and a POM file containing the essential metadata required for the specified project type.

Example 6.2 shows the command for using the JBI archetypes.


The value passed to the -DarchetypeArtifactId argument specifies the type of project you wist to create.

As shown in Example 6.3, you instruct the FUSE ESB Maven tooling that the project is for a JBI component by specifying a value of jbi-component for the project's packaging element.


The plugin element responsible for packaging the JBI component is shown in Example 6.4. The groupId element, the artifactId element, the version element, and the extensions element are common to all instances of the FUSE ESB Maven plugin. If you used the Maven archetypes to generate the project, you should not have to change them.


The configuration element and its children provides the FUSE ESB tooling with the metadata needed to construct the jbi.xml file required by the component.

Once the project is properly configured, you can build the JBI component by using the mvn install command. The FUSE ESB Maven tooling will generate a standard jar containing the component and an installable JBI package for the component.

As shown in Example 6.5, you instruct the FUSE ESB Maven tooling that the project is for a shared library by specifying a value of jbi-shared-library for the project's packaging element.


You build the shared library using the mvn install command. The FUSE ESB Maven tooling will generate a standard jar containing the shared library and an installable JBI package for the shared library.