Does SCR annotations work in AEM 6.4?

kishore_polsani

26-10-2018

Hi,

I am upgrading AEM 6.2 to AEM 6.4 (archetype 13), I am using SCR annotations in AEM6.2. I tried to use same SCR annotation for time being rather than using OSGI  declarative services annotations in AEM6.4. When I use SCR annotations, "Declarative Service Components" are in satisfied state, when I use OSGI annotations, I can see component is active.

Is SCR annotations compatible in AEM 6.4?

Accepted Solutions (1)

Accepted Solutions (1)

smacdonald2008

26-10-2018

SCR Annotation by default are used in Maven 10 archetypes. I have successfully deployed Maven 10 projects to AEM 6.4. The answer is yes - SRC annotations work in AEM 6.4 - however - it's considered better practice to use R6 annotations.

Answers (1)

Answers (1)

Jörg_Hoh

Employee

26-10-2018

the SCR annotations are processed during build time (you can find the result inside the bundles in the OSGI-INF directory), and both SCR and OSGI annotations should create the same XML files. There is no runtime dependency on the annotations themselves. But of course there is the SCR Service, but that has nothing to do with the SCR annotations in the first place.

Jörg