On Thu June 25 2009 10:00:49 am rbaumx wrote: > Hi Dan, > > thank you for your answer. Your tool might be a real help for migrating > normal Java projects / dependencies into OSGi projects. But the mapping > file seems to be the critical point. To gather this infomation is exactely > the point where I'm investigating (wasting?) a lot of time at the moment.
Right. In general, I've been saying the ServiceMix 4 project has spent (wasted?) a lot of their time doing all this. It's best to just grab the work they've done for their CXF integration. The partial "goal" of that plugin was to eventually get it added to a build someplace, maybe into CXF or something, that would map all the deps into OSGi deps. If a dependency in CXF changes, that plugin would catch the fact that the new dependency isn't and OSGi bundle and then fail the build so we know immediately that someone, someplace, needs to create a bundle for it. Thus, the mapping would take a while to setup once, but it would have to be maintained as deps change or builds will start failing. The OTHER benefit is that it would create a new cxf-osgi-all "bundle" that ONLY depends on other OSGi things. Thus, if your maven build depends on cxf- osgi-all, you could do "mvn dependency:copy-dependencies" and everything that gets downloaded and stuck in target would be the osgi stuff and would be everything needed for OSGi + CXF. > Did you ever come to a closed and consistent set of bundles? This would be > a very valuable information for me. I've attached the output pom of the osgiify plugin for the cxf-bundle. If you stick that someplace and run "mvn -f osgiified-pom.xml dependency:copy- dependencies" it should give you a fairly complete set of bundles in target/dependency. The stuff that I couldn't find (quick look though) are: commons-collections:commons-collections:3.1 commons-logging:commons-logging:1.1.1 com.sun.xml.bind:jaxb-xjc:2.1.9 antlr:antlr:2.7.7 commons-pool:commons-pool:1.3 jaxen:jaxen:1.1 org.apache.abdera:abdera-core:0.4.0-incubating org.apache.abdera:abdera-extensions-json:0.4.0-incubating org.apache.abdera:abdera-extensions-main:0.4.0-incubating org.apache.abdera:abdera-i18n:0.4.0-incubating org.apache.abdera:abdera-parser:0.4.0-incubating org.codehaus.jra:jra:1.0-alpha-4 xalan:serializer:2.7.1 Other than commons-logging, most of the rest are probably in "edge case" scenarios and are probably not an issue. Dan > Rainer > > dkulp wrote: > > 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 -- Daniel Kulp [email protected] http://www.dankulp.com/blog
osgiified-pom.xml
Description: XML document
