7

For a Java project (with the team of 5-10 developers) should I store my IDE project files (e.g. Eclipse or IntelliJ Idea) in version control system (currently I store only build scripts)? What's the best practice?

PS Do you aware of any tools to automatically generate project files for common Java IDEs according to some descriptor?

Péter Török
  • 114,404
  • 31
  • 268
  • 329
Alexey Kalmykov
  • 1,958
  • 2
  • 15
  • 27
  • Hi Alexey. You might want to break this up into two questions, one about Source control, the other about generating project files. It should make it easier for you to accept the best answer for each part of the question. – Paddyslacker May 27 '10 at 21:14

4 Answers4

8

You might want to take a look at the answers to this question: Which eclipse files belong under Version Control. As to the second part, maven has plugins for IntelliJ and Eclipse at least.

Community
  • 1
  • 1
sblundy
  • 60,628
  • 22
  • 121
  • 123
2

If you care about the project file at all, then you should check it into a VCS. Really, you might not care. But if you do, VCS it...

Zak
  • 24,947
  • 11
  • 38
  • 68
2

Our team (6-8 developers) originally checked in project files, and soon found that they can cause problems when it comes to paths and build path, etc. Usually not, but when an issue did arise it could take time to ferret it out. Then we stopped doing that, and it has worked much better. We now put definitions in the VCS ignore files to make sure they don't get in. However, in our case we work with Maven, so the practice has been create an eclipse workspace and then import the Maven projects from the source. So recreating project environment is quick and predictable. From my experience, checking in can cause minor headaches.

harschware
  • 13,006
  • 17
  • 55
  • 87
1

There are different opinions. Once I was told that I shouldn't put project files in VCS, but then project files ware added to repository (not accidentally).

Many open source projects have project file in VCS. I think it could be good practice if one particular IDE is proffered in other case developers should probably take care on project files by themselves.

Maven can generate project files (at last for eclipse)

Maciek Sawicki
  • 6,717
  • 9
  • 34
  • 48