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
Views
Replies
Total Likes
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.
Hello @seeker
Requesting you to plesae share the values that you have tried for validRoots.
Meanwhile, please add following in pom.xml of ui.apps.structure package
<filter><root>/apps/myapp/components/macrsite/page</root></filter>
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.
Views
Replies
Total Likes
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>
Views
Likes
Replies