2

IntelliJ not find xml file under sources folder.

example) src/net/saltfactory/domain/PersonSqlMap.xml

but, If I copy it and past out folder, IntelliJ find xml file

example) out/net/saltfactory/domain/PersonSqlMap.xml

I hope that don't copy and past XML files to out folder

help me

sungkwangsong
  • 5,575
  • 4
  • 26
  • 18
  • What do you mean by "find"? Are you saying IntelliJ doesn't show it or are you using the find function? Or what? – aberrant80 Jan 27 '10 at 02:46

1 Answers1

6

First, make sure src is marked as a source folder for your module in Module Settings --> Modules --> --> Sources.

Second, make sure the list of recognized resources includes one for XML files (?*.xml) in Settings --> Project --> Compiler --> Resource Settings.

This is how IntelliJ knows what to copy into your classpath (output folder) in addition to class files. If this doesn't help, please provide more information.

SingleShot
  • 18,821
  • 13
  • 71
  • 101
  • I've been looking for this as I was never able to run myBatis+xml mapper with intelliJ IDEA for years....! The second tip did the trick, and now I understand that XML files are also treated as resources. – sCha Sep 20 '16 at 12:37
  • If you use Maven, IntelliJ is smart enough to take care of this for you :-) – SingleShot Sep 22 '16 at 20:08
  • Man, you guys are terrible at giving direction. It's not Module Settings --> Modules --> Sources. It's File --> Project Structure --> Modules ---> Sources. – NoName Jun 16 '17 at 02:38
  • Please note you are responding to an answer that was posted over 7 years ago. IntelliJ has changed a little since then. – SingleShot Jul 05 '17 at 19:38