Versions Compared

Key

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

...

The project has been cut into the following components :

Maven project name = artifactId

Description

Is it a bundle ?

reportincident.activemq

configuration file of the ActiveMQ engine

yes

reportincident.camelqueueservice

configuration file of the camel-activemq component

yes

reportincident.db

generator of the script DB

no

reportincident.features

features provisioning file containing our bundles dependencies

no

reportincident.model

model layer

yes

reportincident.persistence

hibernate persistence layer; bundle

yes

reportincident.routing

camel routing

yes

reportincident.service

spring service layer

yes

reportincident.web

apache wicket module

yes

reportincident.webservice

CXF web service generator

yes

...

Step 1 : Initial Project Setup

Different way exist to create maven project. For the basic project like DB, we have choosen the archetype 'simple' with the command : or maven OSGI project using archetypes : mvn archetype:create -DartifactId=simple ...

instead of for the OSGI bundles we can use one of the two following approaches :

  • Spring archetype : mvn archetype:create -DarchetypeGroupId=org.springframework.osgi -DarchetypeArtifactId=spring-osgi-bundle-archetype ...
  • PAX archetype : mvn org.ops4j:maven-pax-plugin:create-bundle ...

But for the purpose of this tutorial, the spring archetype has been used because it allows to create :

  • all the folders required including also the MANIFEST,
  • Eclipse files
    in one step.

SoFirst, we will create the 10 eclipse (maven projects using names defined in the table ) using with the maven archetype 'spring-osgi-bundle-archetypesimple'.

To create the simple service projectprojects, execute the following command in your Unix/Dos console.

mvn archetype:create -DarchetypeGroupId=org.springframework.osgi -DarchetypeArtifactId=spring-osgi-bundle-archetype -DarchetypeVersion=1.2.0 -m2
-DgroupId=demo org.apache.camel.example -DartifactId=demoreportincident.service-bundle model -Dversion=1.0.1

Remarks:

...

-SNAPSHOT

Import them into eclipse and enable dependency management (see sonatype site)

...

Step 2 : Develop the interface

...