LibraryLink ToToggle FramesPrintFeedback

Maven OSGi Tooling

Maven is a project management tool that encompasses a Project Object Model (POM), a set of standards, a project lifecycle, a dependency management system, and logic for executing plug-in goals at defined phases in a lifecycle.

The FUSE ESB OSGi tooling uses the Maven bundle plug-in from Apache Felix. The bundle plug-in is based on the bnd tool from Peter Kriens.

The Maven bundle plug-in automates the construction of OSGi bundle manifests by introspecting the contents of the classes being packaged in the bundle. Using the knowledge of the classes contained in the bundle, the plug-in calculates the proper values to populate the Import-Package and Export-Package properties in the bundle manifest. The plug-in also has default values used for other required properties in the bundle manifest.

Download and install Maven. See the Apache Maven Project web site for the downloadable files and installation instructions.

After installing Maven, you must change the following settings in your operating system environment:

  1. Set the M2_HOME environment variable to point to the Maven root directory.

  2. Add the Maven bin directory to your PATH:

    • On Windows: %M2_HOME%\bin

    • On UNIX: $M2_HOME/bin

Creating a Maven project requires you to create a directory and a POM. The POM is an XML file containing information about the project and configuration details. Configuration information can include project dependencies, plug ins or goals to be executed, project versions, and so on. Maven uses the configuration information in this file to build the project.

The POMs, along with dependencies that are downloaded and artifacts that are generated when you run Maven commands, are stored on your system in a Maven repository. This repository is located:

See the Apache Maven documentation for more information.

See Understanding the Example in Getting Started with FUSE ESB for information on using a Maven POM to build the bundle for the cxf-osgi example.

See Packaging an Application in Developing and Deploying JAX-WS Services for an overview of developing and packaging a FUSE Services Framework application as an OSGi bundle using the Maven bundle plug-in.

To use the Maven bundle plug-in:

  1. Set up your FUSE ESB OSGi Project.

  2. Configure the plug-in to correctly populate your bundle's manifest.