Expand my Community achievements bar.

Content-Package-Maven-Plugin Import Mode

Avatar

Level 4

Hello AEM Friends,

I have a question regarding the different import Mode's in the Content-Package-Maven-Plugin.

According to the documentation there are 3 modes:

  1. Merge: Content in the package that is not already in the repository is added. Content that is in both the package and the repository is unchanged. No content is removed from the repository. 
  2. Replace: Content in the package that is not in the repository is added to the repository. Content in the repository is replaced with matching content in the package. Content is removed from the repository when it does not exist in the package.
  3. Update: Content in the package that is not in the repository is added to the repository. Content in the repository is replaced with matching content in the package. Existing content gets removed from the repository.  

https://docs.adobe.com/docs/en/aem/6-1/develop/dev-tools/vlt-mavenplugin.html

Reading these, I don't understand the different between Replace & Update. Can someone explain? 

Ultimately is what I would like is the ability to:

1) Content that is not in the repository is added.
2) Content in package that exists in repository is updated.
3) Content that is in the repository is left there.

Also, there is no way to set these options when creating packages in AEM Package Manager. Is that by intention?

We have found a few use cases where we may need to update certain nodes in the repository but leave the JCR relatively intact. Most of our projects are built using AEM archetypes what already have content packages built into them. The only way I can see to accomplish this is to create a new package and push those out to the environments, but that doesn't work very well when using continous integration/delivery methods because we have to update our build systems to be aware of any new packages, deploy it once, then modify it to not run that part of the build again. (Against everything CI).

Thanks,

-Tyler

2 Replies

Avatar

Level 3

Not an answer. That documentation seems to contradict Jackrabbit's definition of update import mode.

http://jackrabbit.apache.org/filevault/importmode.html

ImportMode.REPLACE

This is the normal behaviour. Existing content is replaced completely by the imported content, i.e. is overridden or deleted accordingly.

ImportMode.UPDATE

Existing content is updated. Existing content is replaced, new content is added and none is deleted.

ImportMode.MERGE

Existing content is not modified, i.e. only new content is added and none is deleted or modified.

Avatar

Level 4

This is certainly what I have experienced when playing with these different modes.
Thank you for showing me the underlying jackrabbit documentation for this functionality.

In regards to fixing the documentation, does anyone know if there is a way to submit fixes for the documentation or what the process is?

I would also like to know if it is possible to set these options when creating the packages in package manager.

Thanks again.