How to create content package with merge mode



In AEM 6.0, whenever I install any package it overwrites existing structure on the server. I am creating package and tried with different options such as merge, mergepreserve but it always overwrite existing contents while installing package.

For eg: If  "testpackage" has /content/test/pages in it and target author instance has test pages /content/test/pages/existingpage. After installing "testpackage" on target author instance, I would like to preserve "existingpage" under content path /content/test/pages.

How can I achieve that?

I tried diffferent options provided in package manager but nothing worked - please find screenshot enclosed.

Accepted Solutions (1)

Accepted Solutions (1)




Hi Vipul,

Options 'AC Handling'  you have captured is applicable for the ACLs (Access permissions) for the pages that you would be creating/overwriting [1]

[1] Settings

While you are installing a package, there is no merge option. It is clearly cautioned that it would overwrite or delete the existing content [2]

[2] Packages 

Answers (5)

Answers (5)



Wow. Adobe never added such a basic feature. It could be a single drop down. Par for the course from a company that cares more about selling to VPs than making the lives of developers/admins easier.



  • Create a package using package manager at source server and add your desired filters
  • Download Package
  • Run commands jar -xvf META-INF/vault/filter.xml
  • Edit filter.xml in a text editor
  • modify root filter to add "merge" for example: <filter root="/content/mysite" mode="merge">
  • Run this command to add filter.xml again in the package jar -uvf META-INF/vault/filter.xml
  • Upload and install the package at target server



Wow - am surprised that we can't merge contents of package and AEM can't allow to do that from package.

Thanks for response - we'll login defect against product and hope for the best.



It looks like you cannot specify a mode while creating a package in crx package manager. but if you are creating a package externally, e.g. through a maven plugin - you can specify in filter.xml if the content should be merged.



<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">

    <filter root="/etc/blah/blah" mode="merge" />