Som
Som

Reputation: 11

CI/CD Deployment of Custom Oak Index - AEM On-Prem + AEMaaCS

I am working on AEMaaCS version on my LOCAL. My intent to follow the Best Practices of Oak Index deployment that would work on an AEMaaCS as well as on on-prem AEM latest versions, as and when needed.

I have implemented a simple search functionality within AEM (No Enterprise Search with Apache Solr is involved here). I wanted to create a custom index for the JCR SQL2 query that I am executing programmatically for this purpose. (/demo/ui.apps/src/main/content/jcr_root/_oak_index/demo.search-1-custom-1)

In order to deploy my custom oak:index , I followed - Adobe Guidelines for Oak Index Deployment

After following all the steps this is the ERROR I am getting as part of my maven deployment -

`[INFO] --- filevault-package-maven-plugin:1.3.2:package (default-package) @ demo.ui.apps.structure --- [INFO] Packaging content from 'target\classes' [ERROR] File 'target\classes\META-INF\MANIFEST.MF' not covered by a filter rule and therefore not contained in the resulting package

[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.3.2:package (default-package) on project demo.ui.apps.structure: The following files are not covered by a filter rule: [ERROR] C:\workspace\demo\ui.apps.structure\target\classes\META-INF\MANIFEST.MF`

I tried using versions 1.3.2 to 1.3.4 of the maven filevault plugin. Can you suggest any way to resolve this issue. Am I missing any configuration ? Or else please suggest few other ways of doing this, that would work compliant to AEMaaCS.

Upvotes: 1

Views: 374

Answers (2)

Paul Chibulcuteanu
Paul Chibulcuteanu

Reputation: 298

The Project Configuration section of the documentation is extremely important. Every part of it (versions, configurations, filter.xml) is required for a successful deployment of indexes in AEMaaCS.

On a side note, when customising indexes, I highly recommend using the JCR Query Cheat Sheet

Upvotes: 0

Alexander Berndt
Alexander Berndt

Reputation: 1728

The error-message says, that your content is not covered by a filter.xml rule. The filter.xml file specifies the content, that is in your package-file. It finally tells the PackageManager, which repository-paths shall be replaced/merged, when your content is installed.

https://jackrabbit.apache.org/filevault/filter.html

For your oak:index you should have a rule like this:

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/apps/myproject"/>
    <filter root="/oak:index/cqPageLucene-custom-2"/>
    <filter root="/oak:index/commerceLucene-custom-6"/>
</workspaceFilter>

PS: Eventually some tools have a problem, the the path oak:index is named _oak_index in the source-tree. Then just put 2 entries for each oak:index in your filter.xml

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/apps/myproject"/>
    <filter root="/oak:index/cqPageLucene-custom-2"/>
    <filter root="/_oak_index/cqPageLucene-custom-2"/>
    <filter root="/oak:index/commerceLucene-custom-6"/>
    <filter root="/_oak_index/commerceLucene-custom-6"/>
</workspaceFilter>

PPS: Do the above only, if a IDE plugin (e.g. some kind of Source-Repository-Live-Sync tool) has a problem with the filter-rule.

Upvotes: 1

Related Questions