You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

A key part of a productive development environment is the tooling, for Apache ServiceMix the tooling is provided in the form of a powerful and flexible Apache Maven plugin.  The plugin has many useful features to enable you to work with the different project types available in JBI - such as Components, Service Assemblies, Service Units and Shared Librarys - and also allows you to work interact with a running Apache ServiceMix server by exposing the JSR-208 Ant Tasks as plugin goals.

Getting Started

In order to get started with the plugin you need to make it avilable to your project,  this is done by adding the following to your pom.xml.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  ...    <pluginRepositories>
    <pluginRepository>
      <id>apache.snapshots</id>
      <name>Maven Central Plugins Development Repository</name>
      <url>http://cvs.apache.org/maven-snapshot-repository</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
         <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.servicemix.tooling</groupId>
        <artifactId>jbi-maven-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
</project>

Once this plugin has been added to your POM you can start using the capabilities.  In order to understand all the things you can do we have broken downs its functionality by the type of artifact you wish to create.  JBI covers the creation of four different types of artifact these are:

Shared Libraries 

These are bundles of code or JAR's that you can install onto a server (with a given version) to allow components (BC/SE's) to share physical code.

Working with Shared Libraries

Binding Components/Service Engines 

These artifacts are the installers for components,  allowing you to register a Component that can either start and operate immediately or can wait for the deployment of a service unit.

Working with Components

Service Units

These are zip archives created to contain configuration information of an instance of a service unit that can be deployed to a component (BC/SE)

Working with Service Units

Service Assembly

A service assembly is a collection service units that can be deployed together,  it creates a zip archive containing each of the service units (SU's) 

Working with Service Assemblies

Maven 1.x Support 

Information on the Maven 1.x JBI plugin is available here.

  • No labels