sbt-idea icon indicating copy to clipboard operation
sbt-idea copied to clipboard

Test resources configured as source files

Open REPLicated opened this issue 11 years ago • 4 comments
trafficstars

My sbt project has a standard directory layout. In src/test/resources I keep files that are needed during testing. In my case, this includes .scala files since my program processes scala sources.

Sbt-idea marks src/test/resources as a source directory. This is not desired since resources simply happen to have .scala extension, they might not even be syntactically correct. They should not be processed when I start compilation in IntelliJ Idea.

Is there any reason why sbt-idea adds a <souceFolder> element with isTestSource="true" to the module configuration for resource directories?

There seems to be a way to explicitly mark certain directories as "Resources" and "Test resources" in the Intellj GUI, then this problem disappears.

REPLicated avatar Jan 12 '14 16:01 REPLicated

looks like "Resources" and "Test resources" has been added recently to IDEA 13, so it will not be backward compatible with IDEA 12 though additional flag or setting can be used to do this

jozic avatar Jan 12 '14 17:01 jozic

+1 came across this just today.

davidhoyt avatar Jan 16 '14 04:01 davidhoyt

there a way to configure sbt to mark the resources as resources?

Miuler avatar Jul 06 '14 16:07 Miuler

there a way to configure sbt to mark support for Idea13?

Miuler avatar Jul 06 '14 16:07 Miuler