...
First, we create two eclipse projects using the maven archetype 'springpax:create-osgi-bundle-archetype'. This archetype is helpful because it generates a pom.xml file that we will use with maven goal(s) to create the:
...
To create the simple service project, execute the following command in your Unix/Dos console.
Code Block |
---|
mvn archetype:create -DarchetypeGroupId=org.springframework.osgi -DarchetypeArtifactId=spring-osgi-bundle-archetype -DarchetypeVersion=1.2.0-m2 -DgroupId=demo -DartifactIdops4j:maven-pax-plugin:create-bundle -Dpackage=demo.service -DbundleGroupId=demo.service -DbundleName=demo.service-bundle -Dversion=0.1 |
RemarksRemark:
- The archetype version depends on the version of Spring Dynamic Module used and must be adapted in consequence,
- According to your project, you can change the artifactId to point According to your project, you can change the artifactId to point to com.mycompany.application.service, and groupId com.mycompany.application
To allow your project to be imported in Eclipse, execute the following command
Code Block |
---|
mvn org.ops4j:maven-pax-plugin:eclipse
|
To create the Camel project, execute the following command
Code Block |
---|
mvn archetype:create -DarchetypeGroupId=org.springframework.osgi -DarchetypeArtifactId=spring-osgi-bundle-archetype -DarchetypeVersion=1.2.0-m2 -DgroupId=demo -DartifactIdops4j:maven-pax-plugin:create-bundle -Dpackage=demo.camel -DbundleGroupId=demo.camel -DbundleName=demo.camel-bundle -Dversion=0.1 cd demo.camel-bundle mvn org.ops4j:maven-pax-plugin:eclipse |
Two folders are created with the following name:
...