[
https://issues.apache.org/jira/browse/FELIX-6019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16738564#comment-16738564
]
David Jencks commented on FELIX-6019:
-------------------------------------
I think you have created a new concept of optional component supported in none
of osgi, bnd, or karaf features. FWIW although it’s been several years I think
I encountered a similar problem with osgi subsystems and I don’t recall if or
how I solved it. I believe that if you installed your bundles individually into
karaf rather than as a feature you would have no problems. The problem is that
karaf’s feature resolver is insisting on resolving the non-runtime
effective:=active requirements. Generating the requirement is I believe part of
the ds spec so I would not advise arbitrarily removing it except perhaps as a
temporary workaround. I think better choices are:
- modifying your component to not generate the requirement (such as 0..n
reference set to 1..n with mandatory configuration supplied as json/yaml in the
bundle for the configuration)
- satisfying the requirement with a disabled component that won’t bind
- working with karaf to introduce the concept of optional requirement for a
feature.
What I don’t understand is why, AFAICT, you have not considered the third
option.
> Provide a bnd plugin to remove header parameters
> ------------------------------------------------
>
> Key: FELIX-6019
> URL: https://issues.apache.org/jira/browse/FELIX-6019
> Project: Felix
> Issue Type: New Feature
> Reporter: Oliver Lietz
> Assignee: Oliver Lietz
> Priority: Major
>
> The plugin removes parameters from bundle headers.
> See bnd issue [#2429|https://github.com/bndtools/bnd/issues/2429] and
> SLING-8178.
> Example instruction (for bnd file):
> {noformat}
> -plugin:\
> org.apache.felix.bnd.plugins.header.RemoveParametersPlugin;\
>
> 'Require-Capability'='osgi.service;filter:="(objectClass=org.osgi.service.event.EventAdmin)";effective:=active,osgi.service;filter:="(objectClass=org.osgi.service.event.EventHandler)";effective:=active;cardinality:=multiple'
> {noformat}
> Initial source:
> https://svn.apache.org/repos/asf/felix/sandbox/olli/org.apache.felix.bnd.plugins/
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)