javamavenosgiapache-felixbnd

Feedback on Maven multi-module project setup with OSGi


I am getting in touch with OSGi and trying to setup a project using Apache Felix and Maven. I'd like to use a Multi-Module build and declarative services. The project is hosted on GitHub: osgi-maven-example (Note that the link points to a specific commit and not to the HEAD of the repository.)

I have got a few questions about the overall setup of the project:

Although I am pretty happy over this working example, I am curious if I am using all these technologies in their intended way and I would be very grateful if I could get some feedback on the overall setup before I am starting to use it in a bigger project.


Solution

  • There is now an official set of annotations for DS, under the package org.osgi.service.component.annotations. These annotations are packaged in the jar "compendium" (org.osgi/cmpn), and bnd has a directive to generate components descriptors : -dsannotations : *

    the first part of your question is subject to opinions... maven-bundle-plugin is more "maven centric" : it's more easy to integrate it in a maven build. bnd-maven-plugin is more "bnd centric" : you manipulate standard bnd files, but it broke some maven convention. both have advantage and inconvenient