Expand my Community achievements bar.

SOLVED

Does SCR annotations work in AEM 6.4?

Avatar

Level 4

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

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.

Avatar

Employee Advisor

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