Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

How to create content package with merge mode

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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 

View solution in original post

6 Replies

Avatar

Level 3

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>

Avatar

Correct answer by
Level 10

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 

Avatar

Level 10

You can create a service ticket for this feature and probably Adobe might look at the pros n cons of having it.

Avatar

Level 2

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.

Avatar

Level 3
  • 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

Avatar

Level 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.