My pom file has code something like below: Where I need that should exclude generating given files at the time of building project while should exclude generating the given folder (including all subfolders & files) itself while building project.
<profile>
<id>nets</id>
<properties>
<ulysses.menu>ldms-menu.properties</ulysses.menu>
<approval.workflow>false</approval.workflow>
<mail.useldap>false</mail.useldap>
<mail.latize.usesmtp>false</mail.latize.usesmtp>
<ulysses.base.uri>http://data.latize.com/nets</ulysses.base.uri>
<!-- lee.menu>nets-menu.properties</lee.menu >
<lee.ftl>nets.ftl</lee.ftl>
<path.has.lee>nets</path.has.lee>
<kiwi.pages.startup>core/nets/summary.html</kiwi.pages.startup>
<project.exclude.core.files>**/marmotta/platform/core/services/triplestore/*SesameServiceImpl*.*</project.exclude.core.files-->
<project.exclude.core.files>**/ihg*.*</project.exclude.core.files>
<project.exclude.core.folder>**/web/ihg/**</project.exclude.core.folder>
</properties>
</profile>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<excludes>
<!--excludes native sesame implementation-->
<!--exclude>**/PrimarySesameServiceImpl*.*</exclude>
<exclude>**/ApprovalSesameServiceImpl*.*</exclude>
<exclude>**/SesameServiceImpl*.*</exclude-->
<!--excludes GraphDB sesame implementation -->
<!--exclude>**/GraphDBPrimarySesameServiceImpl*.*</exclude>
<exclude>**/GraphDBApprovalSesameServiceImpl*.*</exclude>
<exclude>**/GraphDBSesameServiceImpl*.*</exclude-->
<exclude>${project.exclude.core.files}</exclude>
</excludes>
<resource>
<directory>${project.exclude.core.folder}</directory>
<excludes>
<exclude>*.*</exclude>
</excludes>
</resource>
</configuration>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
Here file exclusion starting from ihg is working, but folder ihg is not getting excluded. I have no idea how can I exclude folder in this case.