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

rockstar234

13-05-2020

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.

 

rockstar234_0-1589383339545.png

rockstar234_1-1589383512710.png

 

filter.xml

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

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Jörg_Hoh

Employee

13-05-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

Answers (1)

Answers (1)

Ankur_Khare

MVP

13-05-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..