I have a following maven configuration:
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>keystore.jks</exclude>
</excludes>
</resource>
</resources>
I want keystore.jks
to be included in my classes/war application but not to be processed by Maven filtering.
How to change this configuration ?
According to the Maven Resource Filtering Documentation, this should work:
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>keystore.jks</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>keystore.jks</include>
</includes>
</resource>
</resources>
Binary filtering
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>jks</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>