Hi Oliver,
I would not recommend to already rely on the metatype annotations from OSGi as 
those will only generate metatype 1.3 files (runtime dependency) with with 
maven-bundle-plugin 3.0.1 (https://github.com/bndtools/bnd/issues/1183 
<https://github.com/bndtools/bnd/issues/1183>). Therefore those components are 
then no longer compatible with an older Sling version (or with AEM 6.0 or 6.1).
But at least the move towards the semantic versioning annotations should be 
safe as there are IMHO no known issues with maven-bundle-plugin 3.0.1 and there 
is definitely no runtime implication on the switch.

The only thing I am not too sure about is about the dependency:
I would like to add 
>> <dependency>
>>      <groupId>org.osgi</groupId>
>>      <artifactId>org.osgi.annotation</artifactId>
>>      <version>6.0.0</version>
>> </dependency>
in the parent pom and get rid of the bndlib dependency!
Otherwise you would have the same classname twice in the class path (as both 
OSGi and bnd semantic versioning annotations share the same class name, but of 
course in different packages).
Do you see any problems with that step? What other packages are used from the 
bndlib dependency except for the SemVer annotations?
Konrad


 
> On 25 Jan 2016, at 11:34, Oliver Lietz <[email protected]> wrote:
> 
> On Monday 25 January 2016 09:55:19 Konrad Windszus wrote:
>> Hi,
> 
> Hi Konrad,
> 
>> currently we are relying on the bnd annotations for semantic versioning.
>> Since OSGi 6.0 there are also official annotations defined in package
>> “org.osgi.annotation.versioning". This package is provided by <dependency>
>>      <groupId>org.osgi</groupId>
>>      <artifactId>org.osgi.annotation</artifactId>
>>      <version>6.0.0</version>
>> </dependency>
>> 
>> Since version 3.0 those annotations are also understood by bndlib (used
>> since maven-bundle-plugin 3.0), see
>> https://github.com/bndtools/bnd/issues/484
>> <https://github.com/bndtools/bnd/issues/484>. Since this would only mean a
>> compile time dependency requirement on maven-bundle-plugin >= 3.0 I think
>> we should encourage the switch from one package to the other. WDYT?
> 
> we should switch to OSGi annotations but not only for versioning. This can be 
> done one by one and needs not to be done for all modules at once (compile 
> time/tooling only). I've done the switch for Scripting Thymeleaf[1] already. 
> But be prepared - bumpy road ahead, see e.g. BND-1030 or BND-1266.
> 
> Regards,
> O.
> 
> [1] 
> https://github.com/apache/sling/blob/trunk/contrib/scripting/org.apache.sling.scripting.thymeleaf/pom.xml
> 
>> Konrad
> 

Reply via email to