tags:

views:

230

answers:

3

Hi,

I'm working on a uni project with a few other people using SVN. Much to my annoyance the .project file was removed from the repository since "it contains platform specific information". However, this has obviously broken my setup in Eclipse, giving me the error:

Problems occurred opening the selected resources. The project description file (.project) for '___' is missing. This file contains important information about the project. The project will not function properly until this file is restored.

Any suggestions? Thank you.

+2  A: 

That should be easy - checkout an older revision of the project where the .project file is still available, to a temporary location and copy this old version of .project to your actual project folder. You can use the Navigator view which is more convenient for this special copy'n'paste task. (Or do it on the file system outside eclipse)

Once the .project file is back in place you can continue to work as usual.

Alternative: create an empty java project, copy the autogenerated .project to your active project and reconfigure that project.

Andreas_D
+3  A: 

Simply revert the project to a revision that featured the .project file, then put in .svnignores and to back to the current revision again. Or even simpler:

svn cp -r15 .project .project

Where the number after -r is a revision featuring the .project file.

Bozhidar Batsov
+2  A: 

.project files don't belong in an SCM, they contain developer-specific information. Common configuration belongs in some standardized file like (e.g.) a maven pom.xml, from which a .project file is automatically generated, but things like .project, .settings, .classpath should always be in svn:ignore, which means you can keep your own copy without overwriting others

seanizer
This is so wrong!In the real world, You make a decision if a particular IDE or build system is mandatory - OR you decide that it's up to the developers to use whatever they like, but be certain to do a sound analysis of the benefits and drawbacks, as it is inconvenient and time consuming to do so.Maven is build system that requires an editor. Eclipse is an IDE, and provides its own build system.That you may generate eclipse .project files using Maven does not imply that a .project file generally is a derived file, unless someone have come to the unfortunate decision to use Maven.
KarlP
1) 'unfortunate decision'? maven is a *huge* time-saver if you know how to use it correctly and there is no real alternative to a dependency management system like maven (ivy etc. are ok of course) if you are working with third party libraries, continuous integration etc. 2) What do you mean by: maven requires an editor? The mind boggles. I would guess that most programmers have one editor or the other installed somewhere on their system, right? 3) In the real world, as you say, I have not seen any client in the last 3 years not using maven. thank god
seanizer