You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

On this page, we are going to create our first SU module in our project .

Using a Maven archetype to create the service unit project

ServiceMix provides several Maven archetypes to help you create your projects more rapidly and reliably. We start off by using the cxf-se archetype, which is used for creating a servicemix-cxf-se service unit project.

From SMX_HOME/bin directory, we run this command to create a service unit project named :

in MS Windows:

 
smx-arch su cxf-se

in GNU\Linux:

 
./smx-arch su cxf-se

Maven executes the archetype and reports BUILD SUCCESSFUL when it's done. (For more information run smx-arch help)

 
c:\java\apache-servicemix-3.2.1\bin>smx-arch su cxf-se
[INFO] Scanning for projects...
...
[INFO] OldArchetype created in dir: c:\java\apache-servicemix-3.2.1\bin\my-cxf-s
e-su
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Jul 30 08:52:24 CEST 2008
[INFO] Final Memory: 8M/14M
[INFO] ------------------------------------------------------------------------

What is being generated?

First of all, the archetype creates the project directory my-cxf-se-su, containing:

  • a pom.xml file for building the service unit project
  • a directory src/main/resources, in which we will create our xbean.xml file for configuring the service unit
  • a directory src/main/java, in which we will create com/mycompany/ExampleService.java for implementing our service.

Now, we will have to configure the service unit to provide the services we want.



  • No labels