Exclude does not work in filter | Community
Skip to main content
Level 2
August 19, 2016

Exclude does not work in filter

  • August 19, 2016
  • 4 replies
  • 10468 views

Let us say, my project structure in AEM server is as follows-

/apps/myproject/components/compA

/apps/myproject/components/compB

And my project structure in SVN is as follows -

/apps/myproject/components/compA

/apps/myproject/components/compB

/apps/myproject/components/compC

Now, I want that compC should not be installed while installing package, hence I've added filter in pom.xml -

<filter> <mode>update</mode> <root>/apps/myproject</root> <excludes> <exclude>/apps/myproject/components/compC(/.*)?</exclude> </excludes> </filter> But it does not work, after package installation compC also gets installed. Please let me know if what is missing here.   
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

smacdonald2008
Level 10
August 20, 2016

According to the docs here:  https://docs.adobe.com/docs/en/cq/5-6-1/administering/package_manager.html#Package%20Settings, this setting should work. If that is not the case, please file a ticket so supprt team is aware of issue.

joerghoh
Adobe Employee
Adobe Employee
August 21, 2016

Hi,

Can you please post the complete pom.xml for this module?

Jörg

Level 2
August 21, 2016

Hello,

I've attached POM here. Please see the filter section. I do not want to install any tags under the node /etc/tags/test. If I mention root path as "/etc/tags/test" then exclude pattern works which I do not want.

Thanks for your help! 

October 20, 2017

Hi @sumantap75777609,

Did you ever get an answer back on this issue. I am facing the exact same issue as you, where excludes are not being picked up.

I have pasted a snippet from our pom.xml. I want my /apps/my-project folder to be updated but not its 2 subfolders that I have metioned in the excludes.

Thanks,

Joe

=====================

<plugin>

<groupId>com.day.jcr.vault</groupId>

<artifactId>content-package-maven-plugin</artifactId>

<extensions>true</extensions>

<configuration>

   <group>Some Package NAme</group>

   <failOnError>true</failOnError>

   <verbose>true</verbose>

   <useProxy>false</useProxy>

   <filters>

<filter>

<root>/apps/clientlibs/my-project</root>

</filter>

  <filter> 

<root>/apps/my-project</root>

<excludes>

<exclude>/apps/my-project/config.author.prod/adobe-managed-configuration(/.*)?</exclude>

<exclude>/apps/my-project/config.prod.publish/adobe-managed-configuration(/.*)?</exclude>

</excludes>

  </filter>

</filters>

   <embeddeds>

  <embedded>

<groupId>${project.groupId}</groupId>

<artifactId>my-project-core</artifactId>

<target>/apps/my-project/install</target>

  </embedded>

  <embedded>

<groupId>mysql</groupId>

<artifactId>mysql-connector-java</artifactId>

<target>/apps/my-project/install</target>

  </embedded>

  <embedded>

<groupId>org.liquibase</groupId>

<artifactId>liquibase-core</artifactId>

<target>/apps/my-project/install</target>

  </embedded>

   </embeddeds>

</configuration>

</plugin>

March 22, 2018

Recently we faced similar issue with our implementation.

After lot of analysis and search we did following which did the trick:

- In pom.xml we added exclude statement

   <exclude>apps/myapp/i18n/**</exclude>

- In filters we added exclude statement

      <exclude pattern="/apps/myapp/i18n" />

This did the trick. All nodes under node /apps/myapp/i18n got excluded.

i hope this info will be helpful for folks searching for a solution

dkumar_gobi
Level 2
May 2, 2018

If any one want to include content.xml on a node and exclude rest of sub nodes Do it like this.

    <filter root="/libs/cq/gui/components/authoring/editors/clientlibs/core">

        <exclude pattern="/libs/cq/gui/components/authoring/editors/clientlibs/core(/.*)"/>

        <include pattern="/libs/cq/gui/components/authoring/editors/clientlibs/core"/>

    </filter>