nerdexam
Adobe

AD0-E136 · Question #108

What is the preferred format for defining multi-line RepoInit scripts in AEM?

The correct answer is B. .config format. .config (Apache Felix OSGi configuration format) is preferred for multi-line RepoInit scripts because it natively supports multi-line string arrays - the scripts property of org.apache.sling.jcr.repoinit.RepositoryInitializer can be expressed cleanly as scripts=["line…

Code Refactoring and Tooling

Question

What is the preferred format for defining multi-line RepoInit scripts in AEM?

Options

  • A.properties format
  • B.config format
  • C.xml format
  • DJSON-based .cfg.json format

How the community answered

(52 responses)
  • A
    2% (1)
  • B
    94% (49)
  • C
    4% (2)

Explanation

.config (Apache Felix OSGi configuration format) is preferred for multi-line RepoInit scripts because it natively supports multi-line string arrays - the scripts property of org.apache.sling.jcr.repoinit.RepositoryInitializer can be expressed cleanly as scripts=["line one","line two","line three"] without escaping headaches.

Why the distractors are wrong:

  • A (.properties): Lacks clean multi-line support; line continuation with backslashes becomes error-prone and hard to maintain for longer RepoInit statements.
  • C (.xml): JCR/Jackrabbit XML is used for content repository serialization (Vault/FileVault packages), not OSGi configuration - it has no role in defining RepoInit scripts.
  • D (.cfg.json): The JSON-based format is valid for many OSGi configs but requires JSON string escaping for newlines (\n), making multi-line RepoInit scripts significantly less readable than in .config.

Memory tip: Think ".config = configured for complexity" - when your OSGi config needs structured, multi-line content like RepoInit scripts, .config is the format designed to handle it gracefully.

Topics

#RepoInit scripts#AEM configuration#.config format#repository initialization

Community Discussion

No community discussion yet for this question.

Full AD0-E136 Practice