Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Filter.xml ValidationViolation: "jackrabbit-filter:

Avatar

Community Advisor

Hi All,

I am trying to add a filter for my tags. This is my tag structure. In the below I don't want my tag1 to get included as part of build whereas I want my tag2 to be part of package.

 

 /content/cq:tags

                          tag1

                          tag2

 

Now below is the filter.xml of content node

<filter root="/content/cq:tags">
<exclude pattern="/content/cq:tags/tag1(.*)?"/>
</filter>
 
I am getting below error when I build
 

[ERROR] ValidationViolation: "jackrabbit-filter: Node '/content/cq:tags/tag1' is not contained in any of the filter rules", filePath=jcr_root/content/_cq_tags/tag1/.content.xml

 

If I modify the filter.xml as shown below then the error gets resolved but my problem is I just want to exclude tag1 from build whereas I want all rest of tags to be included as part of feature development.

<filter root="/content/cq:tags/tag1">
<exclude pattern="/content/cq:tags/tag1(.*)?"/>
</filter>

 

Please suggest.

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @Ganthimathi_R,

 

I believe you are using the updated AEM archetype, there (pom.xml under ui.apps.structure module) you have the option to put the list of valid roots (JCR Paths) that you want to work on as following:

 

 

 

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.jackrabbit</groupId>
      <artifactId>maven-jackrabbit-filevault-plugin</artifactId>
      <version><!-- Specify the version --></version>
      <configuration>
        <properties>
                <cloudManagerTarget>none</cloudManagerTarget>
        </properties>
        <filters>
           <filter><root>/apps/${project-name}</root></filter>
           <filter><root>/content/cq:tags/tag1</root></filter>
           <filter><root>....</root></filter>
        </filters>
      </configuration>
    </plugin>
  </plugins>
</build>

 

 

   please consider additing the root in the list above, that you want to include from filter.xml..

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hello @Ganthimathi_R,

 

I believe you are using the updated AEM archetype, there (pom.xml under ui.apps.structure module) you have the option to put the list of valid roots (JCR Paths) that you want to work on as following:

 

 

 

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.jackrabbit</groupId>
      <artifactId>maven-jackrabbit-filevault-plugin</artifactId>
      <version><!-- Specify the version --></version>
      <configuration>
        <properties>
                <cloudManagerTarget>none</cloudManagerTarget>
        </properties>
        <filters>
           <filter><root>/apps/${project-name}</root></filter>
           <filter><root>/content/cq:tags/tag1</root></filter>
           <filter><root>....</root></filter>
        </filters>
      </configuration>
    </plugin>
  </plugins>
</build>

 

 

   please consider additing the root in the list above, that you want to include from filter.xml..

Avatar

Administrator

@Ganthimathi_R Did you find the suggestion from @silk_route11 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.



Kautuk Sahni

Avatar

Community Advisor

Hello @Ganthimathi_R 

 

"jackrabbit-filter: Node '/content/cq:tags/tag1' is not contained in any of the filter rules"

  • Through this message, the validator aims to verify that we are not creating/manipulating a sub-tree (tag1) in AEM/codebase without having the parent node present.

 

We just need to affirm via ui.apps.structure module, that the node is present in CRX. Thus, validator can skip this check.

  • Go to ui.apps.structure module
  • Open its pom.xml
  • Add following code
<filter><root>/content/cq:tags/tag1</root></filter>

 In your base, you are trying to exclude (which can be confusing), but validator is checking for all configured paths.

 

Please append the config and check, if it resolves the issue.


Aanchal Sikka

Avatar

Level 2

did this solution work for you? what was file vault plugin version you have used, I am on the same boat any info will be very useful. @Ganthimathi_R 

 

Thanks