Versions Compared

Key

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

...

Different way exist to create maven project. For the basic project like db, we have used the archetype 'simple' with the command followed by mvn eclipse:eclipse in the folder created :

Code Block
 
mvn archetype:create -DartifactId=simple -DgroupId=org.apache.camel.example -DartifactId=reportincident.model -Dversion=1.0-SNAPSHOT
cd reportincident.db
mvn eclipse:eclipse

...

But for the purpose of this tutorial, we have used the spring archetype and made some cleanup/modificationsPAX maven plugin. Why this choice, simply because it allows to create :PAX maven plugin offers a lot of advantages regarding to the one of Spring :

  • pom.xml file generated is simple and only include dependencies, plugin required
  • project can be designed with several modules,
  • project can be tested with PAX Exam and launched using PAX runner
  • generate all the folders required including also the MANIFEST,
  • Eclipse files

in one step.

  • the META-INF,
  • manifest file is generated automatically,
  • can be imported easily in Eclipse

To create the tutorial projectsTo create one of the tutorial project, you can follow the procedure described here

1) Execute maven command in your Unix/Dos console :

Code Block
mvn archetype:create -DarchetypeGroupId=org.springframework.osgi -DarchetypeArtifactId=spring-osgi-bundle-archetype 
-DarchetypeVersion=1.2.0 -DgroupId=org.apache.camel.example -DartifactIdops4j:maven-pax-plugin:create-bundle -Dpackage=org.apache.camel.example.reportincident.model -DbundleGroupId=reportincident.model -DbundleName=reportincident.model -Dversion=1.0-SNAPSHOT

2) Import the generated eclipse project in Eclipse workspace
3) Delete non required files like readme.txt , build.properties and template.mf files
3and the folders internal + java class created
4) Enable dependency management (see sonatype site).

Repeat this procedure for the projects :

  • reportincident.activemq
  • reportincident.camelqueueservice
  • reportincident.features
  • reportincident.persistence
  • reportincident.routing
  • reportincident.service
  • reportincident.web
  • reportincident.webservice

otherwise import the content of the unzipped file in your workspace. You will gain time.

...