The requirements are solved purely with the Provide-Capability headers of the bundles. It does not matter if bundle A actually provides such a service. The important thing is that bundle A has a suitable Provide-Capabilitiy Manifest header to announce it will provide a suitable service. If this is not the case then you should make sure the header is added. If you can not change the bundle then you can also add the capability in the feature.
Christian 2017-05-23 10:44 GMT+02:00 Martin Lichtin <[email protected]>: > I'm in the process of moving a system from Karaf 3 to 4.0. The 4.0 > 'features' changes turn out to be quite painful to upgrade.. > > In particulur, with Pax-Exam, I have a situation with a feature B, where > bundle B requires a service from bundle A, from feature A: > > <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="B"> > <repository>mvn:grp/artifact-A/1.0/xml/features</repository> > <feature name="B"> > <feature prerequisite="true">A</feature> > <bundle>mvn:grp/bundle-B/1.0</bundle> > </feature > </features> > > <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="A"> > <feature prerequisite="true">aries-blueprint</feature> > <feature prerequisite="true">deployer</feature> > <feature name="A"> > <bundle>blueprint:mvn:grp/bundle-A/1.0/xml/idA</bundle> > </feature > </features> > > The location and name of feature "B" is provided to Pax-Exam to install it. > What is puzzling is that I see how the "blueprint" XML file is downloaded > and the BlueprintURLHandler > seems to kick in, but at about the same time the Resolver throws a > "missing requirement" > regarding bundle-B missing the service that bundle-A is about to provide. > At this time, blueprint bundle-A has not been fully activated yet. > But should not the prerequisite=true assure that services from bundle A > are all visible > before bundle B is installed and resolved? > > In another, similar situation it seems to work, so perhaps the special > "blueprint:" loader is an issue? > Any other ideas how to better debug? I turn on org.apache.karaf TRACE but > no real info comes out. > > - Martin > -- -- Christian Schneider http://www.liquid-reality.de <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de> Open Source Architect http://www.talend.com <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
