Posts

Showing posts with the label Declarative Service

Migration from SCR annotation to OSGI Declarative Service

In this post we will see the migration of aem project from SCR annotation to OSGi Declarative service or R6 annotation. From beginning we were using SCR annotations for backend aem development. From AEM 6.2 R6 annotation are introduced and recommended to used R6 annotation. SCR (Service Component Runtime) Annotations : the maven-scr-plugin uses the SCR annotation from corresponding subproject at Apache felix. All annotations are in the org.apache.felix.scr.annotations package. If you want to use scr annotations in your project you have to use below plugin and dependency <plugin>       <groupId>org.apache.felix</groupId>       <artifactId>maven-scr-plugin</artifactId>        <version>1.7.4</version> </plugin> <dependency>      <groupId>org.apache.felix</groupId>       <artifactId>org.apache.felix.scr.annotations</artifa...