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
Standard Maven syntax
You can utilize an archetype by issueing the following command:
Code Block |
---|
mvn archetype:create \ -DarchetypeGroupId=org.apache.servicemix.tooling \ -DarchetypeArtifactId=servicemix-archetype-name \ -DgroupId=org.apache.servicemix.samples.embedded \ -DartifactId=servicemix-embedded-example \ -DremoteRepositories=http://people.apache.org/repo/m2-incubating-repository |
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.
Also, you can omit the -DremoteRepositories parameter if you have previously configured the repository as explained in 2.1. Beginner - Configuring Maven.
smx-arch
ServiceMix also ships with a smx-arch
, available in the bin
directory of the distribution. It provides a more convenient way for using the archetypes:
No Format |
---|
Usage: smx-arch command [su-type] [args]
commands:
sl Creates a new Shared Library"
se Creates a new Service Engine"
bc Creates a new Binding Component"
sa Creates a new Service Assembly"
su Creates a generic Service Unit"
su [type] Creates a SU of the specified type"
SU types:
http-consumer, http-provider,"
jms-consumer, jms-provider,"
ftp-poller, ftp-sender,"
jsr181-annotated, jsr181-wsdl-first,"
saxon-xquery, saxon-xslt,"
eip, lwcontainer, bean, ode"
Optional arguments:
-DgroupId=xxxx"
-DartifactId=xxxx"
|
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.
...