Maven + IntelliJ

I have a maven project with tests and a resource in src/test/resources called test.sql.
It appears Intellij is not copying this file to the test-classes folder.
Other files, such as xml files that live in the same src/test/resources, are getting copied correctly.
Is there a file mask that Intellij is using to decide which resources to copy to test-classes folder ?

This works when I run it using maven from command line.

Thanks in advance,
Dominic

2 comments
Comment actions Permalink

Is there a file mask that Intellij is using to decide which resources to copy to test-classes folder ?
Thanks in advance,
Dominic

Yes. Open the settings dialog via File| Settings or use ctrlaltS. Under "Project Settings", open the "Compiler" settings. On the top of the "Compiler" dialog is a text field for "Resource patterns". This mask is used to determine what resources are copied from any source directory (main or test). Add the mask for the sql file:



If you want to make the change so all future projects have the same setting, you need to make the change in the "Template Project" settings. You can access those via File | Template Project Settings. (Or open the settings dialog when there is not any project loaded.)

Edited by: Mark Vedder on Oct 1, 2008 9:47 AM
Corrected a grammatical error typo

0
Comment actions Permalink

Is it possible to make IntelliJ pull this setting from a Maven pom?

0

Please sign in to leave a comment.