I started working on an "OSGiIfy" maven plugin that would take an existing project/pom and a mapping file and spit out/deploy a new pom that would replace all the deps with OSGi versions. I used the cxf-bundle as a starting point. I never got to finish it or complete it, but you can look at it at:
http://fusesource.com/issues/browse/ESB-673 The cxf-osgi-all.tar.gz can be used to create a cxf-osgi-all artifact that would be equivilent to cxf-bundle, but all the deps would be OSGi aware. Dan On Wed June 24 2009 8:02:36 am rbaumx wrote: > Hi all, > > after having experimented for several days with different ways to integrate > CXF in our OSGi environement - unfortunately all without a really > satisfying success - I want to carry my question into the community - even > though it has something of "the standard OSGi question reloaded ..." > > First what I would be extremly happy with: "simply" a (self-containing) > list of bundles that can be used as a target platform in Eclipse to work > with the CXF samples. Maybe someone who already has taken this barrier can > post it in a reply and perhaps mention where the bundles come from? For me > and I think for all coming after me this would be a great help. There's a > complete set of jars for normal Java projects and it works well. So why not > at least document the OSGi variant? > > There are quite a lot of hints in the mailing list - (for me) unfortunately > with too short descriptions of the solution. So maybe someone can add the > missing links to the approaches below if the above list is not that easy to > accomplish. (There are some further approaches with maven repositories but > I want to limit my list a bit.) > > (1) I have read about a CXF bundle in <cxf>/distribution/bundle containing > everything. Hmm, in my distribution apache-cxf-2.2.1 there is no such > folder. I have found 2 bundles in ./lib that might match the description. > But none of them "contains all" in a sense that it contains the non-osgi > jars inside and in the classpath. So if someone starts with these bundles > he/she has to lookup for all these jars in external repositories or must > "bundlify" them by himself. Both ways no fun particularly if you are not > familiar with the correlations. I stopped this approach after 1 day (with > "uses conflicts") because I cannot imagine that there is no better way to > come to a CXF-OSGi distribution. > > Or was I looking into the wrong bundles and there is such a all-in-one CXF > bundle that together with the already OSGi-capable bundles of the > distribution like geronimo-jaxws_2.1_spec-1.0.jar etc. forms a complete > environement? > > (2) The DOSGi distribution seems to be a good starting point. Perhaps not > the single-bundle-distribution for production purposes but the > multi-bundle-distribution? I didn't try it yet but it seems that there are > some of the bundles of the normal CXF distribution missing. Does anyone > have experiences wether it already is (or is a good starting point for > building) a target platform and which CFX standard features are perhaps > missing? > > (3) ServiceMix uses CXF in an OSGi environment / handles it as OSGi > component and there is an easy to install and start sample for it. > Unfortunately this handling is absolutely invisible at least for the > ServiceMix newbie. So is there a possibility to see which OSGi bundles are > effectively installed and started when running the example and where are > these bundles are taken from? > > This approach is my favorite in the moment and I'm working on it. This > morning I have tried to take all the bundles under ./system in the SMX4 > distribution, build a target platform from them (i.e. flatten the directory > structure and add org.eclipse.osgi_3.5.0.v20081201-1815.jar) and create a > run configuration with the Eclipse PDE tools. Unfortunately I ran into a > "uses confict" again coming from the cxf-bundle-2.1.4.jar concerning > javax.mail in version 1.4. Do not understand it yet, because there is only > one exporter of javax.mail and he does it in the right version ... > > Maybe someone can tell me the most promising way and enrich it with some > helpful tips? > > Thank you! > Rainer -- Daniel Kulp [email protected] http://www.dankulp.com/blog
