Apache 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.
...
Code Block |
---|
mvn archetype:create \ -DarchetypeGroupId=org.apache.servicemix.tooling \ -DarchetypeArtifactId=servicemix-archetype-name \ -DarchetypeVersion=archetype-version \ -DgroupId=org.apache.servicemix.samples.embedded \ -DartifactId=servicemix-embedded-example \ -Dversion=1.0-SNAPSHOT |
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.
...
- add an additional parameter (
-DremoteRepositories=http://peoplerepository.apache.org/repo/m2-incubating-repositorycontent/groups/public
) to the command above - or you can configure the additional repository as described in Configuring Maven (3.x-incubating versions only)
smx-arch
ServiceMix also ships with smx-arch
(or smx-arch.bat
for Windows), 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:
-DarchetypeVersion=x.y.z-classifier (if not specified, the latest released version will be used
-DgroupId=xxxx"
-DartifactId=xxxx"
|
...
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 httphttps://peoplerepository.apache.org/maven-snapshot-repository/org/apache/servicemix/tooling/content/groups/public/ or in the archetypes
directory in a ServiceMix source distribution.
...
archetype | JBI component | contents of xbean.xml | remarks | |
---|---|---|---|---|
servicemix-bean-service-unit | a bean endpoint definition | also generates a sample class named MyBean | ||
servicemix-camel-service-unit |
| deploys a set of Camel EIP routes | ||
servicemix-cxf-bc-consumer-service-unit | <cxfbc:consumer/> endpoint |
| ||
servicemix-cxf-bc-provider-service-unit | <cxfbc:provider/> endpoint |
| ||
servicemix-cxf-se-service-unit | [ servicemix-cxf-se] | <cxfse:endpoint/> |
| |
servicemix-drools-service-unit | a drools endpoint | also generates a sample Drools rule file named router.drl | ||
servicemix-eip-service-unit | an example for every EIP supported |
| ||
servicemix-exec-service-unit | <exec:endpoint/> | Provides a service unit for an exec endpoint executing a command. | ||
servicemix-file-poller-service-unit | < file:poller/> endpoint |
| ||
servicemix-file-sender-service-unit | < file:sender/> endpoint |
| ||
servicemix-ftp-poller-service-unit | an <ftp:poller/> endpoint |
| ||
servicemix-ftp-sender-service-unit | an <ftp:sender/> endpoint |
| ||
servicemix-http-consumer-service-unit | <http:consumer/> endpoint |
| ||
servicemix-http-soap-consumer-service-unit | <http:soap-consumer/> endpoint |
| ||
servicemix-http-provider-service-unit | <http:provider/> endpoint some examples of possible HTTP consumer endpoint configurations |
| ||
servicemix-http-soap-provider-service-unit | <http:soap-provider/> endpoint |
| ||
servicemix-jms-consumer-service-unit | <jms:consumer/> endpoint |
| ||
servicemix-jms-soap-consumer-service-unit | <jms:soap-consumer/> endpoint some examples of possible HTTP provider endpoint configurations |
| ||
servicemix-jms-jca-consumer-service-unit | <jms:jca-consumer/> endpoint |
| ||
servicemix-jms-provider-service-unit | <jms:provider/> endpoint some examples of possible JMS consumer endpoint configurations |
| ||
servicemix-jms-soap-provider-service-unit | some examples of possible JMS provider endpoint configurations <jms:soap-provider/> endpoint |
| ||
servicemix-jsr181-annotated-service-unit | a JSR-181 annotated POJO endpoint | also generates a sample class named ExampleService | ||
servicemix-jsr181-wsdl-first-service-unit | a JSR-181 WSDL based endpoint | also generates a sample WSDL file | ||
servicemix-lwcontainer-service-unit | / | the servicemix.xml provided defines a sample lightweight component | ||
servicemix-mail-poller-service-unit | <mail:poller/> endpoint |
| ||
servicemix-mail-sender-service-unit | <mail:sender/> endpoint |
| ||
servicemix-ode-service-unit | Apache ODE BPEL engine | / | creates a sample BPEL, WSDL and deploy.xml | |
servicemix-osworkflow-service-unit | OpenSymphony workflow engine | / | creates a sample workflow | |
servicemix-quartz-cron-trigger-service-unit | <quartz:endpoint/> endpoint with cron trigger definition |
| ||
servicemix-quartz-simple-trigger-service-unit | <quartz:endpoint/> endpoint with simple trigger definition |
| ||
servicemix-quartz-custom-marshaler-service-unit | <quartz:endpoint/> with a custom marshaler |
| ||
servicemix-saxon-xquery-service-unit | examples of all supported (resource, inline and dynamic) ways to XQuery | also generates an example of an XQuery file | ||
servicemix-saxon-xslt-service-unit | examples of static and dynamic XSL-T usage | provides an example of an XSL-T file | ||
servicemix-script-service-unit | <script:exchangeProcessor/> with groovy script |
| ||
servicemix-scripting-service-unit | <scripting:endpoint/> with groovy, jruby and javascript scripts |
| ||
servicemix-smpp-consumer-service-unit | <smpp:consumer/> endpoint |
| ||
servicemix-smpp-provider-service-unit | <smpp:provider/> endpoint |
| ||
servicemix-snmp-poller-service-unit | <snmp:poller/> endpoint |
| ||
servicemix-snmp-trap-consumer-service-unit | <snmp:poller/> endpoint |
| ||
servicemix-validation-service-unit | <validation:endpoint/> endpoint |
| ||
servicemix-vfs-poller-service-unit | <vfs:poller/> endpoint |
| ||
servicemix-vfs-sender-service-unit | <vfs:sender/> endpoint |
|