Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Wiki Markup
\[INFO\] Scanning for projects...
\[INFO\] Searching repository for plugin with prefix: 'archetype'.
\[INFO\] \---------------------------------------------------------------------------\-
\[INFO\] Building Maven Default Project
\[INFO\]    task-segment: \[archetype:create\] (aggregator-style)
\[INFO\] \---------------------------------------------------------------------------\-
...
\[INFO\] <span style="color: #ff00ff">Defaulting package to group ID: org.apache.servicemix.samples.helloWorldSE</span>
...
\[INFO\] \****\**\**\**\**\**\**\**\**\* End of debug info from resources from generated POM \**\**\******************\*
\[INFO\] <span style="color: #009900">Archetype created in dir: C:\hello-world-SE-SU-SA\hello-world-SE</span>
\[INFO\] \-----------------------------------------------------------------------\-
\[INFO\] BUILD SUCCESSFUL
\[INFO\] \-----------------------------------------------------------------------\-

...

from the hello-world-SE-SU-SA directory, the SA is generated in the hello-world-SE-SU-SA/hello-world-SA/target/ directory. Of course, it our code does not yet do anything, but we can already deploy the SA and needed components to a running ServiceMix container by switching to the hello-world-SE-SU-SA/hello-world-SA/ directory and calling

No Format
mvn jbi:projectDeploy

ServiceMix will output this confirmation

No Format

INFO  - ServiceAssemblyLifeCycle       - Starting service assembly: hello-world-SA

Adding functionality

 

Essentially, the plugin will walk the dependencies starting in the current project, then deploy each of the dependencies in reverse order. So it copies contents of the hello-world-SA-1.0-SNAPSHOT.zip and orther sources to ServiceMix subdirectories. For further information see Maven JBI plugin. When the deployment is complete, ServiceMix will output this confirmation:

No Format

INFO  - ServiceAssemblyLifeCycle       - Starting service assembly: hello-world-SA

Note: The command mvn install executed in the hello-world-SE directory creates a JAR and also a component installer. For installation, mvn jbi:installComponent has to be executed.

Note
titleDeploying Dependencies

When working with the jbi:projectDeploy one may want to disable dependency deployment. When deploying to a server which has other components sharing these dependencies, they can cause problems while trying to undeploy and redeploy them. To stop the jbi-maven-plugin undeploying and redeploying dependencies, the configuration files (usually in the SA's or the component's pom.xml) have to be extended by a new element called deployDependencies with a value of false (<deployDependencies>false</deployDependencies>). This has to be placed in the configuration section for the jbi-maven-plugin. The final structure looks like this:

<build>
    <plugins>
        <plugin>
            <artifactId>jbi-maven-plugin</artifactId>
            <configuration>
                <deployDependencies>false</deployDependencies>
            </configuration>
        </plugin>
    </plugins>
</build>

Adding functionality

Configuring the Service AssemblyConfiguring the Service Assembly 

manually editing http://goopen.org/confluence/display/SM/Working+with+Service+UnitsImage Removed

manually editing http://www.servicemix.org/site/working-with-service-assemblies.htmlImage Removed

use the SU archetype like in http://www.servicemix.org/site/creating-a-protocol-bridge.htmlImage Removed

use the SA archetype like in http://www.servicemix.org/site/creating-a-protocol-bridge.htmlImage Removed
  

Note
titleTODO

it and we now need to fill the holes.

Then you can send an request to ...

The default implementation of the component accepts InOut MEPs and return the input content as the out message.

Using an IDE to add meat to the component. You can either use IDEA or Eclipse, I tried it with Eclipse so I guess I am going to stick it for now. <TODO>

This shall already include everything stated at
http://www.servicemix.org/site/maven-jbi-plugin.html#MavenJBIplugin-GettingStarted
and
http://www.servicemix.org/site/working-with-components.html