Should I use POM first or MANIFEST first when developing OSGi application with Maven? -
there 2 main approaches when developing osgi application maven: pom-first , manifest first.
i'm looking answer in form of table shows pros , cons of each method.
to more specific, know how relates to:
- maturity of toolset
- vendor independence
- development ease (which includes finding people can development on tooling)
- compatibility
- avoiding classnotfound
- avoiding manual work
at present can come with
pom-first pros (using maven-bundle-plugin)
- leverages existing maven skills, repositories , tooling.
- likely easier find people know how manage pom.xml rather manifest.mf along pom.xml
- most of information in manifest.mf can obtained pom.xml itself.
- can work other ides not eclipse based ones.
- less invasive, add single plugin , change packaging type "bundle"
pom-first cons
-
classnotfoundexceptionmore occur @ runtime. however, can mitigated using pax-exam (although complicated set up). - still need understand how manifest setup make sure
instructionsconfiguration element set correctly.
manifest-first pros (using tycho-maven-plugin)
- seems recommended approach, or @ least talked recommended approach, can't see why has significant benefit. (hence why question asked).
- good developing eclipse plugins , integrates pde
- provides tooling testing allowing
classnotfoundexceptionappear during junit testing rather runtime.
manifest-first cons
- seems work on eclipse based ides. don't have use eclipse, without pde want to?
- violates dry principles since have put keep names , versions pom , manifest.mf in sync.
- need name things in specific fashion
- you cannot mix, meaning existing maven multi-project installations cannot tack on osgi support
- a lot more configuration compared maven-bundle-plugin needed less warnings: http://wiki.eclipse.org/tycho/reference_card#examplary_parent_pom
- have make test cases separate project. won't run when built in src/test/java.
- seems test classes exposed, in other words in ".internal." not testable.
if asked recommendation enterprise using maven , want move osgi pom first
if asked recommendation doing eclipse plugin development, manifest first -- tycho
Comments
Post a Comment