Prevent IntelliJ from adding iml files

In case somebody else stumbles onto this issue, the best luck I've had is
Settings > Version Control > Ignored Files
Add "Ignore all Files Matching"s for:
*.idea
*.iml

Not sure which version of IDEA rolled out this functionality, and this question is somewhat old, so it may be moot. Just hope it helps somebody else out who landed here from Google as I did.


The latest version of IntelliJ Community prompts you for the iml file additions separately. If you check the box to avoid being warned in future and choose "no" the first time you are prompted, it will not schedule any further IML files for addition to subversion.


Elaborating on Colin Hebert answer. Yes, it is possible to move the iml file to another directory when importing from Maven. And this seem to be the only way to prevent this problem.

Here the settings to use in import:

enter image description here

Since all important informations are keep in Maven itself it only takes a little time to reimport an existing modules. The gain truly is worth it.