On Apr 8, 2013, at 11:26 AM, Glen Mazza <[email protected]> wrote: > Hi, my WSDL-first tutorial provides an option to host the web service > provider on an OSGi container ( > http://www.jroller.com/gmazza/entry/web_service_tutorial#WFstep3-service). My > maven-bundle-plugin configuration in the service's pom.xml (which works fine) > is as follows: > > <plugin> > <groupId>org.apache.felix</groupId> > <artifactId>maven-bundle-plugin</artifactId> > <configuration> > <instructions> > <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> > <Require-Bundle>org.apache.cxf.bundle,org.springframework.beans</Require-Bundle> > <Export-Package>service</Export-Package> > </instructions> > </configuration> > </plugin> > > Question though, I don't know if I should be using a more granular bundle > than the "org.apache.cxf.bundle" listed above -- I can't find a sample using > something different, but IIRC CXF had/has a huge deprecated OSGi bundle that > included everything, I'm unsure if "org.apache.cxf.bundle" is referring to > that super-bundle, and hence I should be using something else today.
With "modern" CXF usage, you shouldn't need the Require-Bundle stuff there at all, especially if you flip to using Blueprint instead of Spring. > Another question: What object in the CXF source code is > "org.apache.cxf.bundle" precisely referring to -- I can't find it within the > CXF features file ( > http://svn.apache.org/viewvc/cxf/trunk/osgi/karaf/features/src/main/resources/features.xml?view=markup) > and a <grep -r "org.apache.cxf.bundle" . --include "pom.xml"> from the CXF > trunk is returning nothing. Stated another way, if the CXF team wanted to > change the name of the require-bundle to "org.apache.cxf.bundle.banana", > which pom.xml file (or other file?) in the CXF source would need to be > changed to accomplish that? Well, it's actually one of two bundles depending on the environment: osgi/bundle/all - the big massive bundle from the <=2.5.x days. <bundle.symbolic.name>${project.groupId}.bundle</bundle.symbolic.name> or: osgi/bundle/compatible - for >=2.6.x, this is a tiny bundle named the same as the big bundle designed to provide some level of compatibility with the older big bundle by providing a bundle with the same name (so the Require-Bundle works). In any case, for modern usage, I'd recommend removing the Require-Bundle entirely and let the maven bundle plugin do it's thing properly. Hope that helps! Dan > > Thanks, > Glen > > > -- > Glen Mazza > http://www.jroller.com/gmazza/ > Twitter: glenmazza > -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
