简体   繁体   中英

Eclipse and SVN: Missing .project file

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.

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.

.project files don't belong in an SCM, they contain developer-specific information. Common configuration belongs in some standardized file like (eg) 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM