Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
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>

Project Types 

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:

...

Working with Service Assemblies

Running under ServiceMix 

As shown in the project types, each different project type can be deployed to a server using the JBI plugin (thought the ANT tasks defined in the JBI specification).  The only issue here can be working out dependencies and trying to make sure that you deploy the dependencies.  This means if you have a Service Assembly you wish to deploy you need to first get the dependent components (and maybe even the dependent shared libraries) deploy.  The Maven2 JBI plugin provides a couple of goals that can help you work through this.

mvn jbi:deployProject 

If you have created you assemblies, service units, components and shared libraries as Maven projects (which all ServiceMix components are) you can use this goal.  In essence the plugin will walk the dependencies starting in the current project then deploy each of the dependencies in reverse order.  This can be very useful if you want to quickly get up and running with a new Service Assembly against an installed instance of Apache ServiceMix.

mvn jbi:servicemix 

If you quickly want to get up and running with Apache ServiceMix the best way is to use this goal.  As an extension of the deployProject goal is works in much the same way,  the difference is that this goal downloads and starts a copy of Apache ServiceMix within Maven so you don't need to have a version installed,  this can be very useful if you are working on trying out functionality and want to simply test your projects. 

Maven 1.x Support 

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