You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Konrad Windszus <ko...@gmx.de> on 2019/06/25 10:56:43 UTC

OSGi DS 1.4 run time dependency with latest bundle parent

The latest sling bundle parent defines version 1.4.0 of the dependency "org.osgi:org.osgi.service.component.annotations" (https://github.com/apache/sling-parent/blob/e9b6c950b577172cd613fbcbe06a9120bcd789c2/sling-bundle-parent/pom.xml#L287).
Once you use that you get a requirement like following in the created bundle headers: "osgi.extender;filter:="(&( osgi.extender=osgi.component)(&(version>=1.4.0)(!(version>=2.0.0))))". 
Due to that requirement the bundle will no longer start in OSGi DS 1.3 or older implementations, although the XML might be fully compliant with DS 1.3. Further details about this in https://github.com/bndtools/bnd/issues/2163#issuecomment-388542309.

Are we fine in general to only support OSGi DS 1.4 and no longer OSGi DS 1.3 in Sling for all new releases?
Do you know of any other workaround how to prevent that header from being emitted apart from overwriting the version 1.4 with the version 1.3?

In my particular use case I am talking about Sling Models (https://issues.apache.org/jira/browse/SLING-8452).

Thanks for your input,
Konrad
 


Re: OSGi DS 1.4 run time dependency with latest bundle parent

Posted by Carsten Ziegeler <cz...@apache.org>.
As DS 1.4 provides some nice new features and as the Apache Felix 
implementation is available for quiet some time, I think we can safely 
go with 1.4 as the base.



Regards

Carsten


Konrad Windszus wrote
> The latest sling bundle parent defines version 1.4.0 of the dependency "org.osgi:org.osgi.service.component.annotations" (https://github.com/apache/sling-parent/blob/e9b6c950b577172cd613fbcbe06a9120bcd789c2/sling-bundle-parent/pom.xml#L287).
> Once you use that you get a requirement like following in the created bundle headers: "osgi.extender;filter:="(&( osgi.extender=osgi.component)(&(version>=1.4.0)(!(version>=2.0.0))))".
> Due to that requirement the bundle will no longer start in OSGi DS 1.3 or older implementations, although the XML might be fully compliant with DS 1.3. Further details about this in https://github.com/bndtools/bnd/issues/2163#issuecomment-388542309.
> 
> Are we fine in general to only support OSGi DS 1.4 and no longer OSGi DS 1.3 in Sling for all new releases?
> Do you know of any other workaround how to prevent that header from being emitted apart from overwriting the version 1.4 with the version 1.3?
> 
> In my particular use case I am talking about Sling Models (https://issues.apache.org/jira/browse/SLING-8452).
> 
> Thanks for your input,
> Konrad
>   
> 
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org