Added file to "Exclude Files" but it's still being copied

Answered

I"m trying to prevent a resource file (hibernate.cfg.xml) from being copied during build because I have another version of it in a different directory (my local Hibernate settings) that is copied as well. After I add it to Project Structure -> Exclude Files it's still copied to the output directory despite that.

I tried using different patterns with wildcards like:

 

*src/hibernate.cfg.xml*

*hibernate.cfg*

 

but the file was still copied. What is the proper pattern to exclude this file?

0
1 comment

When you mark file/folder as excluded you exclude it from IDE indexing and navigation. To exclude file from being copied/compiled by IDE builder please exclude it in Compiler | Excludes settings. 

Please note that is you are using Maven/Gradle in project then related configuration should be done in pom.xml/guild.gradle file instead.

0

Please sign in to leave a comment.