With IntelliJ IDEA, how can I exclude a directory from a project without opening an IDE?

For reasons beyond the control of my manual, many of my project directories should contain several symbolic links to directories containing a huge number of files (potentially hundreds of thousands) in the network file system. They are parallel to the root pom.xml.

When IntelliJ tries to index these directories, it freezes (I expect this to end in the end). Often I can mark these directories as excluded, so IntelliJ will not index them. However, these directories are sometimes created after the initial import of the project. If IntelliJ catches them before I can mark them as excluded, it freezes. Even worse, when I restart and try to open a project, it freezes again.

How can I point out that these directories should be excluded without actually opening the project in IntelliJ IDEA?

+4
source share
1 answer

, . .iml . excludeFolder content :

<?xml version="1.0" encoding="UTF-8"?>
  <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
    <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
      <!-- other things will be here -->
      <content url="file://$MODULE_DIR$">
        <excludeFolder url="file://$MODULE_DIR$/directoryToExclude" />
        <excludeFolder url="file://$MODULE_DIR$/target" />
      </content>
      <!-- etc -->
+4

All Articles