views:

86

answers:

2

Hi,

I have some projects on bzr code repositories shared with colleagues.

Problem is, I really want to switch to eclipse in some projects, but I don't want to pollute the repository with the unnecessary metadata eclipse creates in its Workspaces.

Any idea how to keep Eclipse's metadata outside my bzr repo?

Adam

+3  A: 

If you know the names of the meta files created, you could put them into your .bzrignore file in your repository's directory.

See this part of the bzr docs

Jannis
+2  A: 

All the main metadata in eclipse are in the workspace.

You project, meaning:

  • your .project file
  • your .classpath file
  • your .settings directory
  • your source files

should all be located elsewhere, within your main project directory.

All those files (except the .class files generated by the compilation) should be versioned.

See "Do you keep your project files under version control?" for more, but also:

VonC
Actually, I think versionning .project, .classpath and .settings is not such a good idea.If it is a java project, you should probably think about maven. in which case the core eclipse metadata can be regenerated from the POM (which should be versionned) for new developpers and add the .project, .classpath and .settings to the ignore list. This way everyone can tweak things as he wants without bothering the others. Or you can check-in a core set of files and make it a policy that these are not to be changed. Code style and such should be checked by a continous integration server.
Jean
If you version .project, .classpath, etc., remember to use relative paths (using variable names or workspace-relative paths). I like putting .project under VC because I can force my sources to be UTF-8 at project level, which will work from scratch on all OSes.My rule of thumb is to exclude automatically generated files: binaries of course, but also compiled/runtime-copied resources, HTML javadoc and log files.
streetpc