...
- Maven 2.0.4 or higher
- If you have never used Maven previously the Maven Getting Started Guide explains some valuable concepts surrounding Maven
- ServiceMix 3.0 1 or higher
- See the ServiceMix downloads
- A broadband internet connection (so Maven can automatically download dependencies)
...
The command above will create a directory named hello-world-se
that houses a Maven project for the JBI service engine being created here. The name of the directory is taken from the artifactId
parameter.
The first three parameters to the mvn
command (-DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-service-engine -DarchetypeVersion=3.1-incubating-SNAPSHOT) identify which Maven archetype to use for the archetype:create
goal, while the last two parameters (-DgroupId=org.apache.servicemix.samples.helloworld -DartifactId=hello-world-se) uniquely identify the Maven project that is being generated. The groupId
(printed in pink) is used as the Java package and the artifactId
is used as the project name. Therefore, only alphanumeric characters are valid values for the groupId
and artifactId
parameters.
...
Panel | ||
---|---|---|
|
Again, Maven creates a directory using the artifactId
provided (printed in green in the command and output). Inside this directory resides the pom.xml
and the src
directory.
Note | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
The maven-archetype-plugin 1.0-alpha4 or above is required for this tutorial. When an older version is installed, a build error will occur. The version of this plugin can be checked by verifying the name of the following directories:
In case the only version available of the maven-archetype-plugin is an older one, a minimal
|
Creating the JBI Service Engine
1) Change the package name from org.apache.servicemix.samples.helloworld
to org.apache.servicemix.samples.helloworld.se
Creating the Maven Subprojects For the Service Unit and Service Assembly
...