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
You can also just right click on your folder and select Mark Directory As > Excluded . Excluded folders (shown as rootExcluded) are ones that IntelliJ IDEA "partially ignores".
Under File > Settings > Build, Execution, Deployment > Compiler > Excludes, add an entry.
In this field, the path to a file or directory to be excluded from compilation is shown. Recursively. For a directory: select this option to exclude from compilation all the corresponding subdirectories. Alt+Insert. Use this icon or shortcut to add a file or directory to the list.
From the main menu, select File | Project Structure Ctrl+Alt+Shift+S and click Modules. Select the necessary module and open the Sources tab. next to Source Folders or Test Source Folders. Specify the package prefix and click OK.
Try
File -> Settings -> Compiler -> Excludes
Add your path to Path
and select Recursively
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With