开发者

Prevent IntelliJ from adding iml files

I'm working with Maven pom files, and I don't wish to source control iml files. When I open a project, IntelliJ seems to add some of the iml files it creates to the SVN source control. How can I prevent this?

I have "*.iml" in an "svn:ignore" property on the repository root, but it doesn'开发者_运维技巧t seem to prevent IntelliJ from adding the imls.


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:

Prevent IntelliJ from adding iml files

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.


You can also choose to not have your .iml file in a versionned directory.

When you create the module, you can select the module file location.

Prevent IntelliJ from adding iml files

Here my iml file will be in /ModuleName.iml but the content will by in /myRoot/


If you want to disable checking in *.iml files across all projects, on the Mac OS X 10.8.x you can go to IntelliJ -> Preferences (Command-,) -> Version Control -> Ignore Files and set it up there. This is better if you are like me who works on many projects and frequently need to create/import new projects, I don't want to have to setup this pref on every individual project.


What worked for me, on my Intellij 2019 (2019.2.4 is my version) is:

Prevent IntelliJ from adding iml files


Configure IntelliJ to not add files automatically to subversion.

In IntelliJ 6, this configuration is on Settings > Version Control > General Settings:


File Creation/Deletion

When files are created with IDEA:

[x] Show options before adding to version control

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜