Expand my Community achievements bar.

SOLVED

Exclude filter not working for filevault-package-maven-plugin

Avatar

Level 4
I have a content package with nodes I would like to exclude when this package is installed on AEM 6.5. The exclude configuration is defined in filter.xml (META-INF/vault/filter.xml).

Below is a representation of my filter.xml

 

 

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/apps/amzn-biz">
        <exclude pattern="/apps/amzn-biz/i18n(.*)"/>
    </filter>
    <filter root="/apps/sling"/>
</workspaceFilter>

 

 

My pom.xml has below configuration

 

 

<!-- ====================================================================== -->
            <!-- V A U L T   P A C K A G E   P L U G I N S                              -->
            <!-- ====================================================================== -->
            <plugin>
                <groupId>org.apache.jackrabbit</groupId>
                <artifactId>filevault-package-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <group>amzn-biz</group>
                    <acHandling>merge_preserve</acHandling>
                    <packageType>content</packageType>
                    <embeddeds>
                        <embedded>
                            <groupId>com.amazon.business</groupId>
                            <artifactId>amzn-biz-foundation.core</artifactId>
                            <target>/apps/amzn-biz/install</target>
                        </embedded>
                    </embeddeds>
                    <subPackages>
                        <subPackage>
                            <groupId>com.adobe.cq</groupId>
                            <artifactId>core.wcm.components.all</artifactId>
                            <filter>true</filter>
                        </subPackage>
                        <subPackage>
                            <groupId>com.adobe.cq</groupId>
                            <artifactId>core.wcm.components.examples</artifactId>
                            <filter>true</filter>
                        </subPackage>
                    </subPackages>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.day.jcr.vault</groupId>
                <artifactId>content-package-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <verbose>true</verbose>
                    <failOnError>true</failOnError>
                </configuration>
            </plugin>

 

 

I have tried multiple things by changing my exclude patterns to ./i18n. but it has not worked for me.

I have also tried adding filterSource to filevault-package-maven-plugin configuration but then i get the error Project contains filter.xml in META-INF/vault but also specifies a filter source.

1 Accepted Solution

Avatar

Correct answer by
Employee

I just used 

 

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/apps/wknd">
<exclude pattern="/apps/wknd/i18n(.*)"/>
</filter>
</workspaceFilter>

 

and it worked without any issues. 

 

What version of AEM? 

View solution in original post

3 Replies

Avatar

Level 10
What is your version of filevault-package-maven-plugin

Avatar

Correct answer by
Employee

I just used 

 

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/apps/wknd">
<exclude pattern="/apps/wknd/i18n(.*)"/>
</filter>
</workspaceFilter>

 

and it worked without any issues. 

 

What version of AEM?