Not supported on Cloud Service
Migrating Felix SCR annotations to OSGi Declarative Services
Adobe lists the Apache Felix SCR and metatype APIs as removed and points to the OSGi Declarative Services and metatype annotations instead. Older AEM 6.x code built with the maven-scr-plugin must be converted before it will build and deploy on Cloud Service.
Affected packages and APIs
org.apache.felix.scr.annotationsorg.apache.felix.scr
What to use instead
org.osgi.service.component.annotations (@Component, @Reference, @Activate) with org.osgi.service.metatype.annotations (@Designate, @ObjectClassDefinition).
How to fix it
- Replace @Component + @Service with @Component(service = ...).
- Move @Property definitions into an @ObjectClassDefinition interface and bind it with @Designate.
- Replace @Reference field options with DS equivalents (cardinality, policy, policyOption).
- Remove the maven-scr-plugin and build with bnd-maven-plugin as in the current AEM project archetype.
AEM 6.5
@Component(immediate = true, metatype = true)
@Service(Runnable.class)
@Property(name = "scheduler.expression", value = "0 0 2 * * ?")
public class Cleanup implements Runnable { }Cloud Service
@Component(service = Runnable.class, immediate = true)
@Designate(ocd = Cleanup.Config.class)
public class Cleanup implements Runnable {
@ObjectClassDefinition(name = "Cleanup")
public @interface Config {
String scheduler_expression() default "0 0 2 * * ?";
}
}How we detect it
- Readiness scan rule
felix-scr: Felix SCR annotations (org.apache.felix.scr removed).
Best Practices Analyzer reports it under OCU.
Can agents fix it?
High. This is one of the most reliable conversions for agents, checked by compiling and by bundle activation tests.
Source: Adobe Experience League. Checked 19 October 2026.