This question already has an answer here:
Should I check in my .project and .classpath files?
My friend told me that I should only check in .java files and the build.xml to guarantee portability. He said ".classpath will cause you much less portability on different environment. .project is entirely your local eclipse setting"
I agree with him, but partially.
-- Not checking in .project file will make my development less efficient (I can't simply "import" a project code from a directory)
-- Not checking in .classpath file seems OK to me (?) if my build.xml is written carefully.
Anyone wants to share their experience here?
I would prefer to checkin .project and .classpath.
This would be helpful when this project is being shared by multiple developers. It becomes easy and faster to setup development env. by simply importing this as existing project on any system using eclipse.
Only caution needs to be taken here is classpath's are relative to project.
for this issue, you can choose to create new project and import existing source.
one issue with IDE specific files like .project is that other Developers may want to use another IDE do develop the project, so they may add another type of project files. this will make your repo messy.
We check in .project and .classpath. With ProjectSet's this allows us to check out complex workspaces with a single "Import Team ProjectSet"
There is not problem of checking in .classpath and .project files into repository. It will help developers which use Eclipse to get going faster.
Warning: Make sure your .classpath file is referencing only artifacts which either checked into the repository with the project or can be obtained automatically (such as maven artifacts).