Exclude does not work in filter

Avatar

Avatar

sumantap7577760

Avatar

sumantap7577760

sumantap7577760

19-08-2016

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.   

Replies

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

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

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.1K

Likes

1.1K

Correct Reply

1.1K

Avatar

Jörg_Hoh

Employee

Total Posts

3.1K

Likes

1.1K

Correct Reply

1.1K
Jörg_Hoh
Employee

20-08-2016

Hi,

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

Jörg

Avatar

Avatar

sumantap7577760

Avatar

sumantap7577760

sumantap7577760

21-08-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! 

Avatar

Avatar

joeg96766913

Avatar

joeg96766913

joeg96766913

19-10-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>

Avatar

Avatar

shajiahmed

Avatar

shajiahmed

shajiahmed

11-01-2018

I am having the same issue

Avatar

Avatar

Murali89

Avatar

Murali89

Murali89

26-02-2018

Is there an update on this issue? I m facing exactly the same issue.

Avatar

Avatar

manavratra

Avatar

manavratra

manavratra

22-03-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

Avatar

Avatar

dkumar_gobi

Avatar

dkumar_gobi

dkumar_gobi

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