Custom oak indexing deployment issue | Community
Skip to main content
June 4, 2025
Solved

Custom oak indexing deployment issue

  • June 4, 2025
  • 1 reply
  • 644 views

Hi All,

I am trying to deploy my custom oak indexes which is placed under "ui.apps/src/main/content/jcr_root/_oak_index" and added the filter 

<filter root="/oak:index" mode="update"/>

When I try deploying my code locally below is the error 
[ERROR] ValidationViolation: Package of type 'APPLICATION' is not supposed to contain content outside root nodes 'apps' or 'libs'! @ jcr_root/_oak_index/.content.xml, line 63, validator: jackrabbit-packagetype, JCR node path: /oak:index
Found 41 violation(s) (with severity=ERROR). Check above errors for details -> [Help 1]
How can I fix this? Is there anything else I am missing?
Appreciate your help!


Best answer by SantoshSai

Hi @priyankakh4,

Can you try enabling the following configuration in your filevault-package-maven-plugin inside the ui.apps pom.xml?

<plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <configuration> <allowIndexDefinitions>true</allowIndexDefinitions> </configuration> </plugin>

Why is this necessary?

It is necessary to enable the allowIndexDefinitions option in the filevault-package-maven-plugin:

  • allowIndexDefinitions: true - Allows packaging and deployment of custom Oak index definitions.

Official Adobe Documentation:
This requirement is documented in Adobe’s official guide on indexing for AEM as a Cloud Service:

Adobe AEM Indexing Guide

“To include custom indexes in your application content packages, it is necessary to enable the allowIndexDefinitions and noIntermediateSaves options in the filevault-package-maven-plugin.”

1 reply

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
June 4, 2025

Hi @priyankakh4,

Can you try enabling the following configuration in your filevault-package-maven-plugin inside the ui.apps pom.xml?

<plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <configuration> <allowIndexDefinitions>true</allowIndexDefinitions> </configuration> </plugin>

Why is this necessary?

It is necessary to enable the allowIndexDefinitions option in the filevault-package-maven-plugin:

  • allowIndexDefinitions: true - Allows packaging and deployment of custom Oak index definitions.

Official Adobe Documentation:
This requirement is documented in Adobe’s official guide on indexing for AEM as a Cloud Service:

Adobe AEM Indexing Guide

“To include custom indexes in your application content packages, it is necessary to enable the allowIndexDefinitions and noIntermediateSaves options in the filevault-package-maven-plugin.”

Santosh Sai
June 4, 2025

Hi @santoshsai,

Thank you for your response, I have updated <allowIndexDefinitions>true</allowIndexDefinitions> the issue is still exists.

SantoshSai
Community Advisor
Community Advisor
June 4, 2025

@priyankakh4 Could you check what is the package type?

<packageType>application</packageType>

change it to 

<packageType>mixed</packageType>

 

Santosh Sai