sergtk
sergtk

Reputation: 10974

Exclude folder with sources which are built in IntelliJ Idea

I open maven project in Idea. I store my files which are used for unit testing in folder \src\test\resources

But the issue is files which are used for testing are java-files.

Despite 'mvn package' skip this files, but when opening in Idea it tries to compile them.

Is it possible to exclude this folder with java-files from sources to be compiled in Idea?

I use IntelliJ Idea 9.0.3

Upvotes: 6

Views: 6977

Answers (2)

Nate W.
Nate W.

Reputation: 9249

Sure, go into your Modules view, find the module in question, and set your src/test directory to Exclude Sources.

Upvotes: 0

Peter Lawrey
Peter Lawrey

Reputation: 533560

Try

File -> Settings -> Compiler -> Excludes

Add your path to Path and select Recursively

Upvotes: 12

Related Questions