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.annotations
  • org.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

  1. Replace @Component + @Service with @Component(service = ...).
  2. Move @Property definitions into an @ObjectClassDefinition interface and bind it with @Designate.
  3. Replace @Reference field options with DS equivalents (cardinality, policy, policyOption).
  4. 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.

The rating is for Surge Migrate's AEM 6.5 code pipeline. Agents draft the change, deterministic rules check it, and a named engineer approves every pull request. Your team merges.

Source: Adobe Experience League. Checked 19 October 2026.

Scan, Convert, Verify, Install

How Surge Migrate helps with a move to AEM as a Cloud Service

Surge Migrate moves a website from any CMS to any CMS, and AEM as a Cloud Service is one of the systems it writes. Pages are converted automatically, and you check the result before you install anything.

  1. 1

    Scan

    Names the system behind your site, counts pages and templates, lists the blocks to build and the work no tool does, and gives an effort range with its working.

    Scan a site →
  2. 2

    Convert

    Each page becomes an Edge Delivery document, an AEM Core Component page and import files for 7 other systems. 10 pages free; 500 or 2,000 pages in one paid run.

    Convert your pages →
  3. 3

    Verify

    A download is offered only when its own format check passes. The report lists every field not found and every component kept as plain content. Compare old and new pages side by side.

    Parity check →
  4. 4

    Install

    You import with the target system's own tool, on your own environment. Each download's README gives the command. Your system changes only when you run it.

    How each import was tested →

Content packages installed on a local AEM as a Cloud Service SDK. See the worked examples.

On AEM 6.5 code: Scan AEM 6.5 code free. The scan reads a repository zip or a Best Practices Analyzer CSV in your browser and lists Cloud Service blockers with file, fix and effort. Nothing is uploaded.