Skip to content

Provide option/annotation to mark a generated "Require-Capability: osgi.service" for a single SCR reference as "resolution:=optional" #7232

Description

@kwin

Although according to https://stackoverflow.com/q/38322981 every DS reference marked with cardinality=ReferenceCardinality.MULTIPLE doesn't lead to auto-generating an Require-Capability: osgi.service header with the according filter, I explicitly want to state that although the reference is mandatory for this particular DS component, the component itself is optional and therefore its references should never appear within Require-Capability without resolution:=optional.

Although there seem to be global options to tweak the behaviour for all components (#1364, https://bnd.bndtools.org/instructions/dsannotations_options.html) there doesn't seem to be an easy option to just state for a DS component that all its references should be considered optional and therefore its own implemented service should also never be referenced in Provide-Capability either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions