Expand my Community achievements bar.

SOLVED

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

Avatar

Level 1

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>

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

9 Replies

Avatar

Community Advisor

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

Avatar

Level 1
@Ankur_Khare In which POM did you used this plugin... I mean in main POM or ui.apps POM.

Avatar

Community Advisor
But as mentioned by @Jorg it's not a good idea to have this in package & i would suggest to use the approach suggested by jorg.

Avatar

Level 1

@Ankur_KhareI agree with @Jörg_Hoh but I have created this micro site in AEM 6.5 using archtype 22 for client its having only 10 pages. So i want everything to be packaged.

Avatar

Level 1

@Ankur_KhareI am getting the same error even i am using below plugin in ui.apps pom file

 

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

</configuration>
</plugin>

Avatar

Correct answer by
Employee Advisor

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

Avatar

Level 1
@Jörg_Hoh 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?

Avatar

Employee Advisor

Definitely we need to follow @Jörg_Hoh 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>

DEBAL_DAS_0-1647102685041.png

 

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

DEBAL_DAS_1-1647102737255.png

 

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