nerdexam
Adobe

AD0-E136 · Question #101

When generating a new AEM multi-module Archetype 27 project, what is the default location for the RepoInit script files?

The correct answer is B. ui.config/src/main/content/jcr_root/apps/<project-name>/osgiconfig/config/. Option B is correct because AEM Archetype 27 introduced the osgiconfig directory within ui.config as the canonical location for OSGi configurations, and RepoInit scripts are deployed as OSGi factory configurations…

Code Refactoring and Tooling

Question

When generating a new AEM multi-module Archetype 27 project, what is the default location for the RepoInit script files?

Options

  • Aui.config/src/main/content/jcr_root/apps/<project-name>/config/
  • Bui.config/src/main/content/jcr_root/apps/<project-name>/osgiconfig/config/
  • Cui.config/src/main/content/jcr_root/config/
  • Dui.config/src/main/content/jcr_root/apps/<project-name>/config/repo/

How the community answered

(45 responses)
  • A
    4% (2)
  • B
    91% (41)
  • C
    2% (1)
  • D
    2% (1)

Explanation

Option B is correct because AEM Archetype 27 introduced the osgiconfig directory within ui.config as the canonical location for OSGi configurations, and RepoInit scripts are deployed as OSGi factory configurations (org.apache.sling.jcr.repoinit.RepositoryInitializer~<name>.cfg.json) - placing them under osgiconfig/config/ ensures they are picked up by the OSGi installer at the correct run mode scope.

Option A is wrong because it omits the osgiconfig intermediate directory; config/ directly under apps/<project-name>/ reflects an older project structure predating Archetype 27's reorganization. Option C is wrong because it drops the apps/<project-name> segment entirely, which would place configurations outside the project's application node - an invalid path for scoped OSGi configs. Option D is wrong because config/repo/ is not a recognized OSGi run-mode folder path; RepoInit configs belong in config/ (or a run-mode variant like config.author/), not a nested repo/ subfolder.

Memory tip: Associate the path with the acronym "OSGi configs go in osgiconfig" - whenever you see an OSGi-related configuration (including RepoInit), the folder chain is always apps/<project>/osgiconfig/config/, never bare config/ or an invented subdirectory like repo/.

Topics

#AEM Archetype#Project Structure#RepoInit Scripts#OSGi Configuration

Community Discussion

No community discussion yet for this question.

Full AD0-E136 Practice