I am trying to copy some resources from one point to another during the build process. Therefore, I use the Apache Maven Resources plugin. In fact, I exclude some files, I do not need this. But I also want to exclude the directory. I tried server-side methods, but that didn't work.
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-client-product</id>
<phase>verify</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/pro/client</outputDirectory>
<resources>
<resource>
<directory>target\products\client\win32\win32\x86\</directory>
<excludes>
<exclude>p2</exclude>
<exclude>eclipsec.exe</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
In this example, I tried to exclude the "p2" folder.
<exclude>*/p2/**</exclude>
<exclude>p2/**</exclude>
<exclude>**/p2</exclude>
Also do not work.
source
share