views:

158

answers:

2

I'm working on a new project with a full ANT build. I use eclipse to write my code, and I would like others to be able to check out the project to have a full working eclipse workspace. I do not want to have specific user settings committed though.

What files and directories should I have in source control?

(I'd rather not just go grab a plugin - I prefer more control over what goes in the repository)

A: 

None. Write a document explaining how to create an Eclipse project using a fresh checkout of the repository. Put that document in the repository as a readme, and update it as necessary. Each developer will have to create their own Eclipse project, but once they create the project, they don't have to do it ever again. It's really not that hard to do, especially if you have an existing Ant build script. I know that's not exactly answering your question, but I absolutely hate seeing IDE-specific files in a source tree.

William Brendel
Whatever saves my time and helps me avoid reading a readme.txt is a winner for me. I absolutely hate as a developer doing various fiddling around the project just to get it ready for development. Eclipse project files can happily live next to idea/netbeans/whatever files, so make lives of your teammates easier, and just commit them. (I'm talking about internal projects here, not some random OSS project you want to hack).
Peter Štibraný
+2  A: 

We just put .project and .classpath in our repository, and that's sufficient to make it work "out of the box" for new developers. I'd like to have other stuff (run configurations come to mind), but haven't figured out how.

We use Subversion, so I put these files in a separate directory and defined svn:externals on that directory to point to the actual code, leaving it unpolluted by IDE-specific files.

Matt McHenry
Thank you. This continues to be my biggest frustration with Eclipse. It seems every other IDE does this better.
Brian Henk