title: IntelliJ Idea: How to (by default) exclude a module from compilation which is broken and which is not part of the maven build?
body: <p>I have a project (in Java 11) consisting of multiple modules. And one module is exluded from the build, so it is commented out in the list of modules in the <code>&lt;modules&gt;</code> tag in <code>pom.xml</code>. The reason is, that it is kindof broken and does not (yet) compile. It is to be fixed in the future. And indeed, when I run the maven build, the build runs fine, the "broken" model does not participate in the build. But when I want to compile changes using the "Build project" button in IntelliJ Idea (version 2018.1.5. Community) then it wants to compile the broken module too and crashes. My workaround so far was simply to add this module to the list of excludes under Settings -> Build, Execution, Deployment -> Compiler -> Excludes. And this works, but other colleagues say, for them it works even without this workaround, so for them the compilation does not touch this module without any additional steps. When entering those classes, there is nothing red on their machines. And now I need to figure out, what could be the reason, why for me it works only with this custom adding the module to exludes? I already tried to "Reimport all maven projects", it did not help. Might there be any IDE settings responsible for not compiling such projects? Any ideas?</p>