views:

1067

answers:

3

I have checked out a bunch of java code using subversion 1.6 and then I imported those projects into eclipse. Subclipse 1.6 picked up the fact that the plugins are under version control, except for a few folders.

I now get a bunch of errors like:

The resource is a duplicate of src/.svn/all-wcprops and was not copied to the output folder

If I delete the project (from eclipse not on disk) and reimport it, that fixes the problem about half the time. But since I have dozens of projects that are having this problem, it means reimporting them 10-20 times before I get them all working. This is very painful, and I am tired of doing it every time someone adds a new plugin to svn or when I need to recreate a workspace for some reason.

Is there an easier way to fix this than delete and reimport? Or is there a way to prevent this problem in the first place?

+5  A: 

Add the .svn folder to the Excluded list for your Source Folder.

  • Project->Properties
  • Java Build Path
  • Source tab
  • Select 'Excluded'
  • click
  • Click next to the Exclusion patterns section on the bottom
  • Add the .svn folder and any others that do not need to be copied to the output directory
Kelly French
+2  A: 

Follow the procedure described by Kelly but define the exclusion pattern as **/.svn/*. This will recursively exclude all .svn directories from the various source folders.

Vladimir
+4  A: 

This is happening because you checked out a project using another svn client other than eclipse and then imported the project in eclipse and you haven't notified eclipse that this is an svn project (that is, eclipse doesn't know it has to ignore the svn meta information).

In order to fix this properly, after you have imported the project in eclipse, have eclipse be 'aware' of the svn nature of the project. Do so by 1) select the project and to to the Team > Share section. 2) a dialog will appear asking weather this is a CVS or SVN project. Select the later. 3) It will prompt for the credentials, enter them. 4) When you're done, do a clean build. The problem goes away.