I'm having a problem where IntelliJ 13.1.4, when running a unit test, can't find a ServiceLoader file in the src/test/resources directory of my module.
Please note before answering that I've done all of the following:
- The module is a Gradle project, and if I run
gradle testthe unit test runs fine. - I've run this unit test successfully in IntelliJ in the past, and it found the module. (Maybe an earlier version of IntelliJ?)
- I've double checked the IntelliJ module settings and the
src/test/resourcesdirectory is marked as being a test resources directory. (See screenshot below.) - I'm dumping the unit test class's classloader's classpath in the class; it has the
build/classes/test/andbuild/classes/javadirectories, but neitherbuild/resources/test/norbuild/resources/main/. - I've clicked the button to refresh all Gradle projects.
Any ideas on what else could be causing IntelliJ to fail here?
Screenshot of my module configuration, showing the Test Resource Folders setting.






