Creating the service assembly
...
With the service units prepared, we are now ready to excerptINLINE
use a Maven archetype to create a service assembly
Creating the service assembly (SA)
Just as we started our service unit with a Maven archetype, we are also going to use a Maven archetype (servicemix-service-assembly
) to create the SA project. Run this command from the directory that holds your parent pom.xml:
...
A new service assembly project is generated in the http-upload-sa
directory.
...
Again, to clean up the build output, we change the project's name
...
...
Adding the SUs to the SA
We want to add the service units we created before to the service assembly. The Maven tooling will do this automatically if we add the correct dependency to our SA's pom.xml. We just use the groupId, artifactId and version we find in our service unit's pom.xml here:
...
...
Running Maven to build everything
Now, run mvn clean install
from the projects root directory to build the whole project.
The output should say that the build of all components succeeded.
...
Now, we are ready to deploy our service assembly. For doing this we just copy the created service assembly jar file (http-upload-sa/target/http-upload-sa-1.0-SNAPSHOT.jar) into the hotdeploy
folder of your ServiceMix installation. Watch the service mix console window for success (or maybe errors).
...