Repost: Make Eclipse ignore .svn directories

Eclipse has the annoying little problem where Eclipse will copy .svn folders to the target/classes output folder and then complain about duplicate resources. After wading through some vague solutions, here’s a clear and simple post I found to solve this annoyance.

Make Eclipse ignore .svn directories

Window -> Preferences…, Java -> Compiler -> Building. Under “Output folder” add “, .svn/” to “Filtered Resources” (so that you get “*.launch, .svn/”).

It still works like a charm. Thanks Brian.

trackback

Tags:

9 Responses to “Repost: Make Eclipse ignore .svn directories”

  1. Thanks man, I wish I knew that one looooong before. It would have spared me many many headaches. At least looks like they’re now over!

  2. Marcel Panse says:

    Great! Is it also possible to exclude all svn dirs from the Search results in Eclipse?

  3. Haven’t verified myself, but if you would install the Subclipse plugin, it should exclude the folders for you. Make sure your project is in ‘Shared’ mode.

  4. Rob Wall says:

    We just did this nifty thing where we put all our unit tests out into a parallel folder heirachy, and tell eclipse (and ant) that we have two source roots. The only snag was hitting this problem & your fixed worked brilliantly. Thanks.

  5. Hi

    I added that line in compiler building but I still get the folders copied, no files, just folders under .svn, any thoughts?

  6. Angel Ivanov says:

    But after export project like *.zip , *.jar, *.war, *.ear – .svn directories are packaged within.
    Is there any way to solve this?

  7. Angel Ivanov says:

    But when eclipse project is exported as *.zip, *.jar, *.war, *.ear – .svn directories are packaged within! Is there any way to solve this problem?

  8. K R says:

    did u find any solution for this Angel Ivanov ????Am also facing the problem :(

Leave a Reply