Disable intellij indexing on specific folder

In my project I have .deploy folder which is created/updated when I deploy my app locally. Is it possible to disable indexing on that folder? Everything slows down whenever I deploy and it's really annoying - I have to wait a few minutes whilist intellij doing unnecessary indexing. In module view I excluded that folder but it's not helping. Any help would be appreciated.


Mark this folder as Excluded in the File | Project Structure | Modules | Sources tab.

Edit: also make sure it's not added as a library in the project.


On IntelliJ 13+ (don't know for earlier versions), you can right click on a folder > Mark Directory As > Excluded.


if you cannot do it throu the Modules menu because your intellij freezes (like in my case) edit .iml file of your projet and add excludeFolder line as below:

<content url="file://$MODULE_DIR$">
  <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
  <sourceFolder url="file://$MODULE_DIR$/src/test/features" type="java-test-resource" />
  <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
  <excludeFolder url="file://$MODULE_DIR$/node_modules" />
  <excludeFolder url="file://$MODULE_DIR$/target" />
</content>