How to create a new OSGi Bundle Maven Project from scratch

  1. Follow the instruction to create archetypes
  2. Install the archetype: run a. mvn clean, b. mvn install in the archetype folder, this will install the archetype to .m2 folder
  3. Go to the parent project folder (make sure you have the super pom there) and run: mvn archetype:create -DarchetypeGroupId=org.stjude.srm -DarchetypeArtifactId=module-bundle-archetype -DarchetypeVersion=1.0.0 -DgroupId=org.stjude.srm -DartifactId=srm-databus-infrastructure -Dversion=1.0.0
  4. Run mvn eclipse:eclipse in the new bundle to generate the required files and folders for eclipse (like: .project, .classpath and .settings)
  5. Import the bundle into eclipse (STS) File-Import-General-Maven Projects
  6. In STS add Spring project nature and OSGi bundle project nature to the new bundle

~ by yingliang on September 16, 2009.

Leave a Reply




*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image