reinclude excluded file in Intellij

Settings | Compiler | Excludes.


For Intellij 14.0 on Windows, undo excludes from compilation

File -> Settings

Then inside Settings -> Build, Execution, Deployment -> Compiler -> Excludes

or just search for "excludes" to find it.


Note in IDEA v12, there is no longer a File | Settings menu option. I'm not sure how to exclude/re-include individual files, but this is how it works for folders...

Now the menu item is File | Project Structure... and that brings up a multi-column dialog. In the rightmost column, click Modules, then select the directory that contains the excluded folder in the second column. If it is a folder you are trying to re-include, it is listed in the third column's directory list, and excluded folders are at the bottom, in red. If you click on the red 'X' to the right of the folder name, it will remove the folder from the "excluded" list which has the effect of including it back in the project. Awkward and counter-intuitive, but that's how it works.


I found that johnkaplantech's answer didn't work because Idea would complain about multiple modules sharing the same root.

So I manually edited the project files to remove the exclusion. File modified was %ProjectRoot%/.idea/modules/<ModuleName>.iml. Inside module/component/content of this XML file was a tag excludeFolder. Remove that.


In IntelliJ IDEA 15.0.3 File | Settings | Build, Execution, Deployment | Compiler | Excludes | (Remove path from right list).