Willem, The generator now uses a 4 step routine: - make an inventory of all the bundles and OSGi exports in the provided dependencies (that's where we define ServiceMix Kernel) - make an inventory of all the bundles and OSGi exports in the src/main/resources/bundle.properties file - scan the Camel component dependencies for JAR files that are already bundles and keep track of their OSGi exports - finally generate the feature descriptor, using all the bundles it inventorized to satisfy the OSGi imports required by the component
Regards, Gert Vanthienen ------------------------ Open Source SOA: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ 2009/4/27 Willem Jiang <willem.ji...@gmail.com>: > Hi Gert, > > Yes, when I remove the dependency of the ServiceMix-Kernel, I can see > the spring bundles below the camel-core feature. > Just quick question, how can the SMX features-maven-plugin find out the > bundles which are not in the bundle repository of Servicemix ? > > Thanks, > > Willem > > Gert Vanthienen wrote: >> Willem, >> >> Excluding a bundle from the provided shouldn't have any real >> side-effects. There will be more bundles in the feature descriptor >> but these would be ignored by Kernel because they're already >> installed. If you run a mvn dependency:tree -Dverbose=true in the >> features project, you'll see a list of things that we include (mina, >> spring, commons bits, ...) >> >> We could adjust the features descriptor generator to create another >> features descriptor, not taking into account any of the bundles that >> are available from kernel. Another solution would be creating a >> servicemix-kernel profile for Pax Runner to provide the missing >> bundles. >> >> Regards, >> >> Gert Vanthienen >> ------------------------ >> Open Source SOA: http://fusesource.com >> Blog: http://gertvanthienen.blogspot.com/ >> >> >> >> 2009/4/26 Willem Jiang <willem.ji...@gmail.com>: >>> Hi Gert, >>> >>> I just found there are not other Spring relates jars in the camel-spring >>> features package. >>> May be I need to install the ServiceMix kernel features first to avoid >>> the org.osgi.framework.BundleException. >>> >>> Willem >>> >>> Willem Jiang wrote: >>>> Hi Gert, >>>> >>>> Since I want to use the features out side of the Karaf, so I want the >>>> stax-api bundle to be included in the camel-core feature. >>>> I guess this inclusion will have side effect on camel-core be load by >>>> Karaf :) >>>> If so I'd like to do that change. >>>> >>>> Thanks, >>>> >>>> Willem >>>> >>>> >>>> Gert Vanthienen wrote: >>>>> Willem, >>>>> >>>>> The generator creates a features descriptor for use in Apache Karaf >>>>> (aka ServiceMix Kernel). It calculates the bundles that are required >>>>> for a given JAR to satisfy all the OSGi imports, but it also knows >>>>> about the packages exported by Kernel itself. In this case, >>>>> ServiceMix Kernel ships with a JAXP spec bundle that has the >>>>> javax.xml.stream packages, so that's why it didn't include that >>>>> bundle. >>>>> >>>>> So, if you'd like to get it included in the features descriptor >>>>> anyway, the way to do it would be by excluding the JAXP Spec bundle >>>>> from the kernel <dependency/> in the features' pom.xml (similar to >>>>> what has been done for the asm bundle). >>>>> >>>>> Regards, >>>>> >>>>> Gert Vanthienen >>>>> ------------------------ >>>>> Open Source SOA: http://fusesource.com >>>>> Blog: http://gertvanthienen.blogspot.com/ >>>>> >>>>> >>>>> >>>>> 2009/4/24 Willem Jiang <willem.ji...@gmail.com>: >>>>>> Hi Gert, >>>>>> >>>>>> I'm try to load the Camel 2.0 SNAPSHOT features from the PAX-Exam. >>>>>> I got below error when the PAX-Runner load the below bundle >>>>>> <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.1/1.3.0</bundle> >>>>>> >>>>>> BTW, If I remove the jaxb-api bundle, the camel-context can be start >>>>>> without any error. >>>>>> Did I miss some thing ? >>>>>> >>>>>> ## DEBUG: errors - FrameworkErrorEvent bundle #7 >>>>>> ## DEBUG: errors - FrameworkErrorEvent throwable: >>>>>> org.osgi.framework.BundleException: Unable to resolve bundle: missing >>>>>> package(s) or can not resolve all of the them: >>>>>> javax.xml.stream;version=1.0.0 >>>>>> at >>>>>> org.knopflerfish.framework.BundleImpl.getUpdatedState(BundleImpl.java:1036) >>>>>> at >>>>>> org.knopflerfish.framework.BundleImpl.start(BundleImpl.java:312) >>>>>> at >>>>>> org.knopflerfish.framework.StartLevelImpl.increaseStartLevel(StartLevelImpl.java:278) >>>>>> at >>>>>> org.knopflerfish.framework.StartLevelImpl$1.run(StartLevelImpl.java:210) >>>>>> at >>>>>> org.knopflerfish.framework.StartLevelImpl.run(StartLevelImpl.java:171) >>>>>> at java.lang.Thread.run(Thread.java:595) >>>>>> org.osgi.framework.BundleException: Failed, missing package(s) or can >>>>>> not resolve all of the them: javax.xml.stream;version=1.0.0 >>>>>> at >>>>>> org.knopflerfish.framework.BundleImpl.start(BundleImpl.java:314) >>>>>> at >>>>>> org.knopflerfish.framework.StartLevelImpl.increaseStartLevel(StartLevelImpl.java:278) >>>>>> at >>>>>> org.knopflerfish.framework.StartLevelImpl$1.run(StartLevelImpl.java:210) >>>>>> at >>>>>> org.knopflerfish.framework.StartLevelImpl.run(StartLevelImpl.java:171) >>>>>> at java.lang.Thread.run(Thread.java:595) >>>>>> >>>>>> Willem >>>>>> >>>> >>> >> > >