[ 
https://issues.apache.org/jira/browse/SLING-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17196213#comment-17196213
 ] 

Konrad Windszus edited comment on SLING-2938 at 9/15/20, 3:11 PM:
------------------------------------------------------------------

This is a misunderstanding: https://github.com/apache/sling-adapter-annotations 
is used by 
https://sling.apache.org/components/sling-maven-plugin/generate-adapter-metadata-mojo.html
 to build JSON metadata (only evaluated in the Felix WebConsole). It won't 
generate the actual SCR definitions. Compare also with 
https://sling.apache.org/documentation/the-sling-engine/adapters.html#implementing-adaptable.

In the long run I would also like to replace generating that JSON in the 
dedicated goal of the {{maven-sling-plugin}} by a custom bnd plugin (similar to 
https://github.com/apache/sling-org-apache-sling-caconfig-bnd-plugin) .


was (Author: kwin):
This is a misunderstanding: https://github.com/apache/sling-adapter-annotations 
is used by 
https://sling.apache.org/components/sling-maven-plugin/generate-adapter-metadata-mojo.html
 to build JSON metadata (only evaluated in the Felix WebConsole). It won't 
generate the actual SCR definitions. Compare also with 
https://sling.apache.org/documentation/the-sling-engine/adapters.html#implementing-adaptable.

> AdapterMethods annotation and adapter proxy service
> ---------------------------------------------------
>
>                 Key: SLING-2938
>                 URL: https://issues.apache.org/jira/browse/SLING-2938
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine, Extensions
>    Affects Versions: Adapter 2.1.0
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: SLING-2938-api.patch, console.jpg
>
>
> Following up on an idea that Olaf Otto presented at CQCon last week, I've 
> been working on an @AdapterMethod annotation that makes it easier to create 
> Sling adapters, as in
>   @Component
>   @Service
>   public class MyAdapters implements AdapterMethodProvider {
>     @AdapterMethod
>     public Bar toBar(Foo f) { ... adapt Foo to Bar ... }
>   }
> As this requires changes to the sling.api bundle, I'll commit to my 
> whiteboard first, for review



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to