Expand my Community achievements bar.

Split AEM policy into multiple files

Avatar

Level 1

I'd like to accomplish two requirements:

  • splitting the large .content.xml file for policies into multiple files to avoid merge conflicts
  • syncing the policies from AEM to the IDE (using the repo tool)

I can split the policy into multiple (sub-)folders and deploy it, but when syncing it back from AEM to the IDE, this new structure gets ignored and the large .content.xml file is re-created.

Any ideas how to solve this problem? Thank you

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Level 2
It is possible to split up the policy-file, just by creating the subfolders with the content XML files. Achieving part two, pulling the subfolders from AEM, is not possible. I don't have a solution for this problem, but I thought it might be interesting to understand the root cause:
 
Pulling from AEM using the repo tool, relies on vault in the background. When vault serialises the nodes, it decides to aggregate them fully, partly or not at all based on the node type and nt:unstructured aggregates the entire subtree into one file. When saving a policy in AEM all nodes within the configuration are updated/overwritten to nt:unstructured. That happens even if the node type was changed before! When pulling the policy, all nodes are aggregated into one large file rather pulling them into multiple, individual files. There is no way to configure that otherwise.