I been evaluating that part of resolver and I couldn't get it running. I
was able to pull additional bundles or features with <conditional>
element, but not with resolver itself.
An example from openHAB project:
https://github.com/openhab/openhab-core/blob/d3d0fe3995b2b950e253d782efbda33b31eebeec/features/karaf/openhab-core/src/main/feature/feature.xml#L523-L533
and my own features I made at some point:
https://github.com/ConnectorIO/connectorio-addons/blob/32c2e2fad7eb38c674c7fb6dd24edf3ff12598a3/features/org.connectorio.addons.feature.io.transport.serial/src/main/feature/feature.xml#L59L71
Best,
Łukasz
On 8/7/25 21:14, Cedric Jonas wrote:
Hi,
The documentation says:
*Requirements*
A feature can also specify expected requirements. The feature
resolver will try to satisfy the requirements. For that, it checks
the features and bundles capabilities and will automatically install
the bundles to satisfy the requirements.
Does that mean that while the resolver is able to start bundles with
capabilities matching the features requirement, it's not able to do the
same for features? So it would not be able to install / start a feature
providing the requested capability? Why does it check the feature
capabilities then?
I tried to setup features using loose dependency coupling: The bundles
in a feature depend on some APIs, which are listed as dependent
bundles / dependent features. When it comes to the implementation
however, I do not care which will be used as long there is one. It's up
to the "Karaf distribution builder" to decide which implementations of a
specific interface will be used. Therefore my consuming feature
specifies a requirement like
"<requirement>serviceregistry;filter:="(backend=*)"</requirement>" while
a providing feature would have following capability:
"<capability>serviceregistry;backend="eureka"</capability>".
Unfortunately, while it complains if the provided capability is not
available, it won't install / start the providing feature if it's still
in status "Uninstalled". Is that a bug, something missing, any other way
to implement this use case..? While the resolver is able to start a
specific bundle providing the capability, it makes sense to me to also
be able to install / start a whole feature.
Thanks!
Regards,
Cédric
------------------------------------------------------------------------
Cédric Jonas - HydroMet - KISTERS AG - Pascalstraße 8+10 - 52076 Aachen
- DE | +49 2408 9385 -453 | cedric.jo...@kisters.de | www.kisters.de |
Handelsregister Aachen, HRB-Nr. 7838 | Vorstand: Klaus Kisters, Hanns
Kisters | Aufsichtsratsvorsitzender: Dr. Thomas Klevers
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-
Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail ist nicht gestattet.