You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Olaf Otto <ol...@unic.com> on 2015/10/19 17:25:43 UTC

DS 1.3+ and Sling convenience annotations

Dear all,

We're trying to do an early adoption of DS 1.3+ in a Sling application. We've thus used the OSGI standard DS annotations along with version 3.0.0 of the maven-bundle-plugin.

<dependency>
    <groupId>org.osgi</groupId>
    <artifactId>org.osgi.service.metatype.annotations</artifactId>
    <version>1.3.0</version>
</dependency>
<dependency>
    <groupId>org.osgi</groupId>
    <artifactId>org.osgi.service.component.annotations</artifactId>
    <version>1.3.0</version>
</dependency>


This works fine. However, we are wondering how convenience annotations such as @SlingServlet should be ported to the standard. It does not seem to be something one can do with the standard annotations. What might be the right approach to do something like this? An extension to the maven-bundle-plugin? Migrating support for custom annotations to the maven-sling-plugin? Any ideas welcome :)

Regards,
Olaf Otto

Re: DS 1.3+ and Sling convenience annotations

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 19.10.15 um 17:25 wrote Olaf Otto:
> Dear all,
> 
> We're trying to do an early adoption of DS 1.3+ in a Sling application. We've thus used the OSGI standard DS annotations along with version 3.0.0 of the maven-bundle-plugin.
> 
> <dependency>
>     <groupId>org.osgi</groupId>
>     <artifactId>org.osgi.service.metatype.annotations</artifactId>
>     <version>1.3.0</version>
> </dependency>
> <dependency>
>     <groupId>org.osgi</groupId>
>     <artifactId>org.osgi.service.component.annotations</artifactId>
>     <version>1.3.0</version>
> </dependency>
> 
> 
> This works fine. However, we are wondering how convenience annotations such as @SlingServlet should be ported to the standard. It does not seem to be something one can do with the standard annotations. What might be the right approach to do something like this? An extension to the maven-bundle-plugin? Migrating support for custom annotations to the maven-sling-plugin? Any ideas welcome :)
> 

The convenience annotations need to work together with the official
annotations, e.g. using @SlingServlet and @Reference on a field.
Therefore I think this needs to be done as a plugin for bnd as bnd is
processing the standard annotations.
But I'm not familiar with that code, so I don't know whether this is
possible at all and what it takes to do this. I guess the best option is
to explain the use case on the bnd list.

Regards
Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org