5

Working in a team, all using IntelliJ, there's some discussion about checking-in or not the .ipr file for the project.

I just lost half an hour because a custom resource pattern was dropped from the compiler options when someone else checked in his .ipr that didn't have this setting.

What's the best practice here? FWIW We ignore .iws already.

Paul McKenzie
  • 19,646
  • 25
  • 76
  • 120
  • possible duplicate of [Intellij Idea 9/10, what folders to check into (or not check into) source control?](http://stackoverflow.com/questions/3041154/intellij-idea-9-10-what-folders-to-check-into-or-not-check-into-source-control) – CrazyCoder Jul 14 '11 at 14:07

4 Answers4

4

I'm always insist on ignoring *.ipr, *.iws, *.iml, *.ids files in VCS.

If you are using java - then use maven. It has a lot of benefits. One of them - it's IDE independent.

UPD. 13.03.2014 For now there exist good alternatives to maven, but the main idea - projects should be IDE independent. No matter what you are using. It should be comfortable for everybody to work with your code.

Igor Konoplyanko
  • 9,176
  • 6
  • 57
  • 100
4

I just lost half an hour because a custom resource pattern was dropped from the compiler options when someone else checked in his .ipr that didn't have this setting.

Can you restore your version from source control?

Storing project files in VCS is warranted by that issue. It makes it easy for new developers to check out and work right away, rather than asking around for how to set up the projects.

The workstation development environment configuration is vital for the team. It's not a deliverable, but it affects the team, for better or worse. Having a standard development environment ensures that you are all working as similarly as possible rather than everyone having the projects configured slightly differently, which could result in false errors.

Matthew Rodatus
  • 1,393
  • 9
  • 18
2

This question is covered in the IntelliJ IDEA FAQ, also it was already asked on this site.

I'd recommend using .idea directory based format for finer control.

Community
  • 1
  • 1
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
0

Previously we committed the ipr and iml files and it worked well. Recently we've adopted Maven and that is working nicely too. The majority of problems I encountered with ipr/iml was during Intellij upgrades. Normally Intellij handles this automatically, but sometimes it isn't as graceful as you'd like. We still have some older versions of our codebase that we have to access periodically, and these do not use Maven. With Intellij 10, we have to manually make substantial configuration changes in those versions before they are usable. To further add to the problem, some of those changes don't appear to be persisted in the ipr/iml, so every user that accesses that version of code has to make the changes themselves. It is close call, but I'd suggest Maven. And for the record most people love or hate Maven, but I'm in the middle.

Johnny
  • 678
  • 1
  • 6
  • 16