bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
531 stars 304 forks source link

-dsannotations generating Require-Capability #1947

Closed rimmeraj closed 7 years ago

rimmeraj commented 7 years ago

if -dsannotations: is defined and xml is generated should not

osgi.extender;filter:="(osgi.extender=osgi.component) be added to the Require-Capability header?

djencks commented 7 years ago

It does when plausible:

    if (options.contains(Options.extender) || maxVersion.compareTo(AnnotationReader.V1_3) >= 0) {
        maxVersion = ComponentDef.max(maxVersion, AnnotationReader.V1_3);
        addExtenderRequirement(requires, maxVersion);
    }

Plausible means you have a DS 1.3+ component or you’ve indicated you want the extender Require-Capability anyway by specifying

-dsannotation-options:extender

While I wouldn’t mind having the default the other way around, that would be rather inconsistent behavior with old bnd versions.

david jencks

On Mar 14, 2017, at 12:00 PM, Dave Smith notifications@github.com wrote:

if -dsannotations: is defined and xml is generated should not

osgi.extender;filter:="(osgi.extender=osgi.component) be added to the Require-Capability header?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bndtools/bnd/issues/1947, or mute the thread https://github.com/notifications/unsubscribe-auth/AAix3jXapTLYVk6S11_TwzGVhUdx_8_aks5rluPcgaJpZM4MdA8I.

rimmeraj commented 7 years ago

If bnd is creating the XML via the -dsannotations how do I specify 1.3 generation?

djencks commented 7 years ago

I think -dsannotation-options:version;minimum=1.3.0

david jencks

On Mar 14, 2017, at 2:07 PM, Dave Smith notifications@github.com wrote:

If bnd is creating the XML via the -dsannotations how do I specify 1.3 generation?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bndtools/bnd/issues/1947#issuecomment-286560758, or mute the thread https://github.com/notifications/unsubscribe-auth/AAix3iLEIr-K4sFXsufT_MXthiCuQckmks5rlwF-gaJpZM4MdA8I.

rimmeraj commented 7 years ago

It is -dsannotations-options but currently it is only in the head it is not in 3.3 or 3.4 dev tag

bjhargrave commented 7 years ago

So is there still a problem here? Or can we close this issue?

rimmeraj commented 7 years ago

Only that you have not released 3.4 ;) .. Close this

timothyjward commented 7 years ago

Sorry for getting to this late. Can you not use:

-dsannotations-options: extender

I think that works in bnd 3.3.0