Getting maven build error while including oak:index in filter.xml | Community
Skip to main content
Level 2
May 13, 2020
Solved

Getting maven build error while including oak:index in filter.xml

  • May 13, 2020
  • 2 replies
  • 9848 views

I have created custom lucene index for my website and want to make this custom lucene index part of the maven build.

I have created  folder  _oak_index and placed below custom index and updated my filter.xml file

But while maven build I am getting below error.

[INFO] ....\mysite\ui.apps\src\main\content\META-INF\vault\filter.xml [ERROR] 1 error(s) detected during dependency analysis. [ERROR] Filter root's ancestor '/oak:index' is not covered by any of the specified dependencies.

 

 

filter.xml

<?xml version="1.0" encoding="UTF-8"?> <workspaceFilter version="1.0"> <filter root="/apps/mysite"/> <filter root="/oak:index/mysiteLuceneIndex"/> </workspaceFilter>

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Please do not include a custom index within /oak:index into your deployment package(s), because it will cause a reindex on every deployment. And this will hurt you on every deployment if your repo is exceeding a few gigabytes.

Rather use EnsureOakIndex [1] to control the deployment of new and modified index definitions.

 

[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-oak-index/index.html

2 replies

Ankur_Khare
Community Advisor
Community Advisor
May 13, 2020

I just tried in my local repo-

with below plugin in pom.xml-

 

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

</configuration>
</plugin>

 

Was able to build it..

Level 2
May 13, 2020
@ankur_khare In which POM did you used this plugin... I mean in main POM or ui.apps POM.
joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
May 13, 2020

Please do not include a custom index within /oak:index into your deployment package(s), because it will cause a reindex on every deployment. And this will hurt you on every deployment if your repo is exceeding a few gigabytes.

Rather use EnsureOakIndex [1] to control the deployment of new and modified index definitions.

 

[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-oak-index/index.html

Level 2
May 13, 2020
@joerghoh Thanks for your input... As of now I want include this in my package..... and I am still getting the above error . could you please help on this. How I can resolve this?
DEBAL_DAS
New Member
March 12, 2022

Definitely we need to follow @joerghoh suggestion here and won't include a custom index within /oak:index into my deployment package.

 

I was facing same issue and able to fix this issue after adding below configuration in ui.apps/pom.xml -

 <failOnDependencyErrors>false</failOnDependencyErrors>

 

https://stackoverflow.com/questions/51324523/content-package-plugin-fails-on-teamcity

 

My build is successful. Please note that , I was doing some experiment with my demo application.

 

 

Debal Das, Senior AEM Consultant