Why is Eclipse trying to copy my .svn folders from src to bin, and how can I make it stop?

前端 未结 6 1355
迷失自我
迷失自我 2020-12-24 11:56

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 ve

相关标签:
6条回答
  • 2020-12-24 12:09

    ------------ Simple way of filtering the output folder-------------

    Window->Preferences->Java->Compiler->Building
    Make sure "Filtered Resources" includes ".svn/"

    0 讨论(0)
  • 2020-12-24 12:11

    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.

    0 讨论(0)
  • 2020-12-24 12:14

    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
    0 讨论(0)
  • 2020-12-24 12:14

    The "accepted best answer" described the cause to me, but as my project was already shared, I 1. closed the project, 2. opend it again and 3. cleaned it. The .svn folder is gone and does not come back.

    0 讨论(0)
  • 2020-12-24 12:20

    This is happening because you checked out a project using an 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 go 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.
    0 讨论(0)
  • 2020-12-24 12:31

    Easier way to do this is:

    • Project > Properties
    • Resource > Resource Filters > Add...
    • Filter type > Exclude all
    • Applies to > Folders
    • Check All children (recursive)
    • File and Folder Attributes > Type ".svn"
    • Hit OK and OK again
    • Clean/build
    0 讨论(0)
提交回复
热议问题