content-package-maven-plugin should skip unpacking content that is not included in package filter
Description
Activity

Masoud Rozati July 28, 2022 at 8:26 PM
Makes sense. Thanks Stefan!
Stefan Seifert July 12, 2022 at 2:01 PM
it’s more the other way around: it’s the question if this default validation from jackrabbit filevault makes sense for packages that are up- and downloaded to AEM.
the files you are mentioned are actually placed there from package manager when building the package (and, at least in the past, they also had a use - if the “in between” nodes are not present when unpacking the root paths from a content packages, those XML files where used to use the correct primary node type - not sure if it’s still the case).
so my recommendation is:
this validation makes sense for fully manually packages content package project which are only uploaded (e.g. ui.apps)
for content packages that are down- and uploaded like sample-content, this validation should be relaxed - example from archetype
Details
Details
Assignee
Reporter

AEM Packages contain the content definition (.content.xml) of all parent nodes, even if they are not covered by the package filter. When the content-package-maven-plugin downloads and unpack the package, you get .content.xml files for root folders that you do not need and you have to remove them manually otherwise the filevault validation fails.
These files are also sometimes committed mistakenly and cause confusion, e.g.
The DownloadMojo or the ContentUnpacker should better consider the package filter and skip upacking of these .content.xml files.