On Monday 25 January 2016 11:46:57 Konrad Windszus wrote: > 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.
I see you have hit several issues also... :/ BND-1183 is fixed for 3.1.0 which will be used by Maven Bundle Plugin 3.0.2. Should we just wait for 3.0.2 release? > 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? I don't have a problem with having multiple classes with same name (AFAIR we've multiple classes named Resource) in the class path but I know some developers have. What about removing bndlib from parent and see what fails? > What other packages are used from the bndlib dependency except for the > SemVer annotations? Not sure about the packages but bndlib (2.4) is also used by our Pax Exam tests. Regards, O. > 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.sl > > ing.scripting.thymeleaf/pom.xml> > >> Konrad
