Highlighted

AEM Cloud Service deployment issue | Packages shouldn't mix mutable and immutable content | AEM Community Blog Seeding

kautuk_sahni

Community Manager

28-07-2020

BlogImage.jpg

AEM Cloud Service deployment issue | Packages shouldn't mix mutable and immutable content by rashid jorvee blog

Abstract

While deploying our old Adobe Experience Manager(AEM) code to AEM cloud service, we find some code smell issues,
ImmutableMutableMixedPackage in project build issue report. We will understand this issue here and also look how to fix this code issue from project.

Lets first understand what part of our AEM project is mutable and immutable.

Mutable
/content , /conf , /var , /etc , /oak:index , /system , /tmp , etc. are all mutable areas of AEM project, it means they can be changed at runtime.
Immutable
/apps and /libs are considered immutable areas of AEM as they cannot be changed and we are not allowed to perform CUD(create, update, delete) operation at runtime. Any attempt to change an immutable area at runtime will fail. On immutable areas we can only perform the read operation.

Issue Description
In order to make our project compatible with Cloud Service deployment model, individual content packages must contain either content for the immutable areas of the repository (that is, /apps and /libs, although /libs should not and never be modified by custom code and will cause a separate violation) or the mutable area (that is, everything else), but not both. For example, a package which includes both /apps/myproject/components/text and /etc/clientlibs/myproject is not compatible with Cloud Service and will cause an issue to be reported.

References
https://docs.adobe.com/content/help/en/experience-manager-cloud-manager/using/how-to-use/custom-code-quality-rules.html#oakpal-packages-immutable
https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/developing/aem-project-content-package-structure.html

Read Full Blog

AEM Cloud Service deployment issue | Packages shouldn't mix mutable and immutable content

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager