There are two main approaches when developing an OSGi application with Maven: POM-first and MANIFEST first.
I’m looking for an answer that is in a form of a table that shows pros and cons of each method.
To be more specific, I would also like to know how it relates to:
- Maturity of toolset
- Vendor independence
- Development ease (which includes finding people who can do the development on the tooling)
- Compatibility
- Avoiding ClassNotFound
- Avoiding manual work
At present this is what I can come up with
POM-First Pros (using maven-bundle-plugin)
POM-First Cons
ClassNotFoundExceptionmore likely to occur at runtime. However, this can be mitigated using pax-exam (although it is very complicated to set up).instructionsconfiguration element is set correctly.MANIFEST-first Pros (using tycho-maven-plugin)
ClassNotFoundExceptionto appear during JUnit testing rather than runtime.MANIFEST-first Cons
If I were asked for a recommendation for an enterprise that is using Maven already and want to move to OSGi then it would be POM first
If I were asked for a recommendation for someone who is doing Eclipse plugin development, then it is Manifest first — with tycho