Alex Rivera | Logout

which eclipse project/workspace files should be added to source control?

Asked 2009-09-02T10:40:22.303
17

I want to share an eclipse project with the rest of my team through SVN. Which files should I add to subversion? In the workspace, there are many files which IMHO are not supposed to be on source control - they are a few megabytes in size.

When adding just the project, another user who checks out the code still has to import the project into the workspace.

Edit: maybe the correct question here, is how can I share my eclipse workspace using subversion?

Edit
Report

1 Answer

1

For the workspace, consider using a 'team project set'. You can create one through the export action. This produces a file which you can email to your colleagues who then import it and all the shared projects will be checked out.

For each project it depends on what type of project it is. If it's a Java project:

  • Exclude the JDT output directory (default is bin/, sometimes out/ is used)
  • Exclude any build artifacts that may have been generated (including those in your source folders)
  • Include .classpath and .project
  • Include your source folders
  • Include your dependencies (if you are not using an external dependency management app like maven)
  • Optionally include your JDT prefs file, depending on whether you want people to share code templates, formatting conventions etc
  • Optionally include any .launch files (saved launch configurations) but be careful as these may have platform specific entries and so won't work on different computers

In general, if a resource is a derivative of another then it should be excluded.

answered 2009-09-02T10:45:11.433

Your Answer