rovarga commented on code in PR #2135: URL: https://github.com/apache/karaf/pull/2135#discussion_r2467136718
########## manual/src/main/asciidoc/user-guide/provisioning.adoc: ########## @@ -406,6 +408,229 @@ A prerequisite feature is a special kind of dependency. If you add the `prerequi } ---- +[[optional-feature-dependencies]] +===== Optional feature dependencies + +A feature dependency can be marked as optional using the `dependency="true"` attribute. This creates a flexible dependency mechanism where the feature dependency is only installed if it's actually needed. + +---- +<feature name="my-feature" version="1.0.0"> + <feature dependency="true">optional-feature</feature> + <requirement>some-capability</requirement> +</feature> +---- + +**How optional dependencies work:** + +* **Default behavior** (without `dependency="true"`): The feature dependency is always installed +* **Optional behavior** (with `dependency="true"`): The feature dependency is only installed if the required capabilities are not already provided by the system Review Comment: I think we want to provide examples of interoperability when version ranges are concerned. Consider a feature with `dependency=true` and version=`[1, 2)` and another feature doing `dependency=false version=1.0.1` .. and similar. We really want to highlight how `dependency=true` makes interop with others easier. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
