AEM as a Cloud Service: Resolving PackageOverlaps warning for Oak Index diff.json
✨ This content is AI generated and could be inaccurate. Generative AI Terms
This article explains how to resolve conflicts and Code Quality warnings in Adobe Experience Manager as a Cloud Service when multiple packages deliver different versions of the Oak Index diff.json file.
Description description
Environment
Adobe Experience Manager as a Cloud Service (all versions)
Symptoms
- Cloud Manager’s Code Quality step reports a PackageOverlaps warning for the path
/oak:index/diff.index. - Multiple sub-projects deliver their own
ui.apps/src/main/content/jcr_root/_oak_index/diff.index/diff.jsonfile. - Each package includes a different
diff.jsonunder the same repository path. - The last-installed package overwrites the others, resulting in only a subset of intended Oak index definitions being present.
- Indexes may be alternately created and removed on deployments, depending on package installation order.
Cause
Multiple packages delivering different versions of the same diff.json file under /oak:index/diff.index leads to file overwrites and Code Quality overlap warnings. Only one canonical delivery of the Diff Index file is supported in AEM as a Cloud Service.
Resolution resolution
Follow the steps below to resolve the issue:
- Designate a single sub-project or package to own and deliver the canonical
diff.jsonfile underui.apps/src/main/content/jcr_root/_oak_index/diff.index/diff.json. - Remove the
/oak:index/diff.indexfilter and associateddiff.jsondelivery from all other sub-projects or packages. - Ensure the canonical
diff.jsoncontains all required Oak index definitions from all sub-projects. - Build the consolidated package and verify that it includes all necessary index definitions.
- Confirm that other packages no longer deliver the
/oak:index/diff.indexnode ordiff.jsonfile. - Deploy the updated packages to a non-production environment (such as DEV or QA).
- Ensure that the PackageOverlaps warning no longer appears in the Code Quality report.
- In the target environment, verify that all required indexes are present and functioning as expected.
recommendation-more-help
experience-cloud-kcs-help-kbarticles