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

Compare with Current View Page History

Version 1 Next »

ServiceMix provides a set of Maven archetypes for many different purposes, such as for creation of JBI components, service assemblies or service units for particular ServiceMix components.

Usage

You can utilize an archetype by issueing the following command:

mvn archetype:create \
    -DarchetypeGroupId=org.apache.servicemix.tooling \
    -DarchetypeArtifactId=servicemix-archetype-name \
    -DgroupId=org.apache.servicemix.samples.embedded \
    -DartifactId=servicemix-embedded-example

You need to replace servicemix-archetype-name by the name of the archetype you want to utilize. This will use the latest released version of the archetype available in the repository. Optionally, you can also specify a specific version to use with the -DarchetypeVersion=VERSION parameter.

List of archetypes

Here is a list of the ServiceMix archetypes that are available. You can also take a look at the current list of available archetypes at http://people.apache.org/maven-snapshot-repository/org/apache/servicemix/tooling/ or in the archetypes directory in a ServiceMix source distribution.

Service units

Most of the ServiceMix archetypes can be used to create service unit projects. The most basic archetype is servicemix-service-unit, which creates a generic SU project. You still have to add a <dependency/> to the pom.xml yourself for the JBI component you want to target. The other archetypes already generate a SU targeted at a specific component. They also provide an xbean.xml file and sometimes some additional sample files.

archetype

JBI component

contents of xbean.xml

remarks

servicemix-bean-service-unit

servicemix-bean

a bean endpoint definition

also generates a sample class named MyBean

servicemix-eip-service-unit

servicemix-eip

an example for every EIP supported

 

  • No labels