How to create content package with merge mode

vipulp33825167

15-10-2015

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)

bsloki

MVP

15-10-2015

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] http://docs.adobe.com/docs/en/cq/5-6-1/administering/package_manager.html#Package 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] http://docs.adobe.com/docs/en/cq/5-6-1/administering/package_manager.html#Installing Packages 

Answers (5)

Answers (5)

jkpanera

18-04-2020

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.

fmateen

18-10-2019

  • Create a package using package manager at source server and add your desired filters
  • Download Package
  • Run commands jar -xvf package.zip 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 package.zip META-INF/vault/filter.xml
  • Upload and install the package at target server

vipulp33825167

15-10-2015

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.

awadheshv

15-10-2015

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.

 

//filter.xml

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

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

</workspaceFilter>