How do you get Intellij IDEA to exclude the filtering of large files listed in the maven pom?
filter, intellij-idea, maven, pom.xml
Solution
This is the solution.
<filters>
<filter>src/main/filters/environment.${env}.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/dict</directory>
<filtering>false</filtering>
</resource>
</resources>
Tests run much faster now when booting up.
Problem
I keep getting this error whenever I run unit tests in IntelliJ IDEA: /home/egervari/IdeaProjects/jobprep-stable/src/main/resources/dict/noun.txt Maven: File is too big to be filtered. Most likely it is a binary file and should be excluded from filtering. The thing is, I do explicitly exclude this file: ``` <filters> <filter>src/main/filters/environment.${env}.properties</filter> </filters> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <excludes> <exclude>src/main/resources/dict**</exclude> </excludes> </resource> </resources> ``` Is my pom.xml written incorrectly? How do I get IDEA to honor what I actually wrote? Basically what I want to achieve is make everything in that resources directory part of the classpath, but I only want to filter applicationContext.xml. Basically, I want maven/idea to not touch the other files, because there is 20 meg in there easily.