Dear community,
I have the requirement to exclude components under one folder from the built package.
I made the following changes to filter.xml
<filter root="/apps/myapp/components">
<exclude pattern="/apps/myapp/components/macrsite(/.*)?" />
</filter>
the ui.apps.structure pom looks like this for app root
<!-- /apps root -->
<filter><root>/apps</root>/filter>
<filter><root>/apps/myapp</root>/filter>
<filter><root>/apps/myapp/components/macrsite/filter>
added below configuration in filevault-package-maven-plugin
<jackrabbit-packagetype>
<options>
<allowComplexFilterRulesInApplicationPackages>true</allowComplexFilterRulesInApplicationPackages>
</options>
</jackrabbit-packagetype>
I am still receiving errors like
ValidationViolation: "jackrabbit-filter: Node '/apps/myapp/components/macrsite/page' is not contained in any of the filter rules", filePath=jcr_root\apps\myapp\components\macrsite\page\.content.xml
ValidationViolation: "jackrabbit-filter: Node '/apps/myapp/components/macrsite/page/head.html' is not contained in any of the filter rules", filePath=jcr_root\apps\myapp\components\macrsite\page\head.html
.
.
etc
Literally the above violation error happens for everything under folder macrsite, I am using filevault-package-maven-plugin of version 1.1.6 and the AEM version in 6.5.18
조회 수
답글
좋아요 수
Hello @seeker
Please refer to https://sourcedcode.com/blog/aem/jackrabbit-filter-filter-roots-ancestor-etc-mobile-groups
Please check, if configuring "validRoots" helps !
unfortunately, it is not working. I am still getting the same error.
This is the addition
<jackrabbit-filter>
<options>
<validRoots>
/apps,
/apps/myapp,
/apps/myapp/components,
/apps/myapp/components/macrsite
<validRoots>
</options>
</jackrabbit-filter>
Tried this as well
<filter><root>/apps/myapp/components/macrsite/page</root></filter>
@seeker Did you find the suggestions from Aanchal helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
조회 수
답글
좋아요 수
The validation errors are gone when I added filter root in the plugin configuration of apps module, but no luck the build is success, however package contains excluded component.
<filters>
<filter>
<root>/apps/myapp/components/macrsite </root>
</filter>
</filters>
조회 수
Likes
답글