views:

157

answers:

4

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?

+2  A: 

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
+7  A: 

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.

sblundy
+1  A: 

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
+2  A: 

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