The FUSE ESB OSGi tooling ServiceMix 4 uses the Maven bundle plug-in from Apache Felix. The bundle plug-in is based on the bnd tool from Peter Kriens. It 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 can calculate the proper values to populate the Import-Packages
and the Export-Package
properties in the bundle manifest.
...
Note | ||
---|---|---|
| ||
When you use the |
Useful Maven archetypes
There are a number of Maven archetypes that will generate a project that is preconfigured to use the bundle plug-in:
Spring OSGi
The Spring OSGi archetype creates a vanilla project for building an OSGi project using Spring DM. You invoke the archetype using the following command:
Code Block |
---|
mvn archetype:create -DarchetypeGroupId=org.springframework.osgi \
-DarchetypeArtifactId=spring-osgi-bundle-archetype \
-DarchetypeVersion=1.12 \
-DgroupId=groupId \
-DartifactId=artifactId \
-Dversion=version
|
Apache Camel Bundle
The Apache Camele bundle archetype creates a project for building a route that will be deployed into ServiceMix 4. You invoke the archetype using the following command:
Code Block |
---|
mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling \
-DarchetypeArtifactId=servicemix-osgi-camel-archetype \
-DarchetypeVersion=2008.01.0.3 \
-DgroupId=groupId \
-DartifactId=artifactId \
-Dversion=version
|
Apache CXF Code-First Bundle
The Apache CXF code-first archetype creates a project for building a service from Java. You invoke the archetype using the following command:
Code Block |
---|
mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling /
-DarchetypeArtifactId=spring-osgi-bundle-archetype /
-DarchetypeVersion=2008.01.0.3 /
-DgroupId=groupId /
-DartifactId=artifactId /
-Dversion=version
|
Apache CXF WSDL-First Bundl
The Apache CXF wsdl-first archetype creates a project for creating a service from WSDL. You invoke the archetype using the following command:
Code Block |
---|
mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling /
-DarchetypeArtifactId=servicemix-osgi-cxf-wsdl-first-archetype /
-DarchetypeVersion=2008.01.0.3 /
-DgroupId=groupId /
-DartifactId=artifactId /
-Dversion=version
|
More information
For more information on configuring the bundle plug-in see:
...