Hi,
Currently Oak is compiled against the pretty much outdated OSGi Core and 
Compendium Spec 4.2 [1].
However the component annotations are used in version 1.3 (introduced with OSGi 
Compendium 6) [2]. The component annotations have not only an impact on the 
build time but also on the run time, therefore for edge cases some code may 
already be incompatible with OSGi Declarative Service 1.1 (shipped with OSGi 
Compendium Spec 4.2). I particularly would like to rely on constructor 
injection 
(https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#d0e46608)
 which eases dealing with components to be used inside and outside OSGi 
runtimes.

I would recommend to require at least OSGi R7 for Oak (released in 2018) and at 
the same time no longer use the aggregate dependency but rather the individual 
chapter dependencies of OSGi separately [3] which are (from Compendium)
- Configuration Admin 1.6 
(https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.cm.html)
- Declarative Services 1.4 
(https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html)
- Metatype Service 1.4 
(https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.metatype.html)

Does anything speak against raising the dependencies accordingly?
Is there any known consumer still relying on Oak in an OSGi container which is 
not at least R7 compliant?

Thanks,
Konrad


[1] - 
https://github.com/apache/jackrabbit-oak/blob/25c01b81768c77e558078a92a31309910902f3a0/oak-parent/pom.xml#L495
[2] - 
https://github.com/apache/jackrabbit-oak/blob/25c01b81768c77e558078a92a31309910902f3a0/oak-parent/pom.xml#L500
[3] - https://issues.apache.org/jira/browse/OAK-9837

Reply via email to