How to stop IDEA from removing groovy directories from runtime classpath?

I have a Java project which contains various resources in directories that come off src/test/resources, e.g.

src/test/resources/javascript_scripts/mytest.js
src/test/resources/groovy_scripts/mytest.groovy
src/test/resources/python_scripts/mytest.python

etc

At runtime I want *everything* in src/test/resources to be available on the classpath.

I notice at runtime the scripts mytest.groovy and mytest.python are available on the classpath but mytest.groovy has automagically been excluded!

Looking in the directory:

out/test/<project_name>

I can see javascript_script and python_scripts have been copied there, but no groovy_scripts.

I have search everywhere to see what is excluding Groovy scripts from being copied to out, but I can't find any clues.

Any help appreciated!

1 comment

What's the value of Settings | Compiler | Resource patterns? Most probably it has !*.groovy. You can change it to something like resources:**/*.groovy which should copy the resource scripts but compile Groovy source files. If you don't need the latter, just remove this resource pattern.

0

Please sign in to leave a comment.