Reputation: 461
Eclipse acts as ".classpath" edited, and puts it in synchronization tab.
When I try to commit that into the repository on SubVersioN, eclipse gives multiple errors. I use jdk 1.6 and maven with Java. When not committing that .classpath thing, there is not any single error. I can commit my other class files succesfully.
Does anyone know how to deal with it?
How can I tell Eclipse that, ".classpath" is not edited or changed?
Upvotes: 0
Views: 916
Reputation: 20658
To make my comment an answer:
Eclipse handles all project's meta files itself. There are several actions that could lead to changes in the .classpath
or even in the .project
file. Most likely changes in the POM.
Errors when trying to commit such changes are most likely due to having a lower local SVN revision than the repository or due to conflicts. For both, do not use the synchronization perspective, but first do an SVN update (rightclick your project -> Team -> Update). If there is a conflict, you will be notified and must solve it. If there is no conflict, you should be able to commit changes, now.
For the future:
I always recommend to not put IDE specific files into version control. This way, each developer can choose whatever IDE he wants to use (if any at all). You also could work from command line (which CI systems do, for example). Using Maven and the M2E plugin in Eclipse is very easy: Checkout the project and afterwards configure it to be a Maven project. No need to have the Eclipse meta files under version control.
If you want to change it right now, do the following:
Remove the Eclipse meta files from the project folder. Commit that change. I recommend to directly operate on the SVN repository (using a repo browser, for example) or to checkout to another place, do the changes there, and commit.
Do an SVN update your project in Eclipse. This will remove the meta files. Update your project and then convert it again to a Maven project (see above).
Last step: Ignore the meta files, so that they will not be committed again. This can be done with Eclipse itself or with the svn:ignore property (we do the latter).
Upvotes: 1