If you want to include the API packages then there is a not well known
but very easy way to do this with the maven bundle plugin.
Simply list the packages you need to embed as Import-Package and
Export-Package. The maven bundle plugin will then create the necessary
imports and exports
and alos notice that the package is not already in you bundle so it will
automatically embed all necessary classes.
This works nicely and is quite simple to maintain.
Christian
Am 03.10.2014 10:54, schrieb Benjamin Graf:
Hi,
I'm actually struggling how to use the API from the org.osgi.enterprise
bundle. I actually know that deploying via felix fileinstall fails and
causes karaf dying (KARAF-2006). Installing via feature or install
command is successful. But in my opinion it's not a good solution to
deploy a bundle which in some circumstances is causing issues and by the
way do I ever really need the whole set of APIs? Mostly not. And of
cause if using feature files you have to face to version question to use
(4.2/4.3/4.3.1/5.0/...) The answer... it depends!
I think there is a bunch of solutions.
- Add bundle into libs folder and import specific packages via
properties file. But this solution is quite hard coded, bad to maintain
and doesn't allow dynamic installation via features.
- Build separate API bundle which only does include needed API (split
enterprise bundle to its defined services). This solution is
reimplementation official API twice.
- ...
Maybe anyone knows the panacea. :-)
Best
Benjamin
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com