Eclipse svn ignore bin

扶醉桌前 提交于 2019-12-18 12:48:12

问题


Eclipse project, I have Subversion set to ignore the bin directory, and also within Eclipse I added bin to the list of ignored resources.

However, every now and then Eclipse puts a .svn directory into bin anyway. This doesn't interfere with Subversion checkins (as the Subversion commandline client obeys the standing directive to ignore the entire bin directory) but it does mess up the display in TortoiseSVN.

Is there a known fix or workaround for this?

(Eclipse 3.5, Windows Vista.)


回答1:


It looks like what is actually happening is that eclipse is copying the .svn directory from your source directories as part of its build -- it thinks it is a "resource" to be copied to your output bin directory. To get it to stop doing that, you can add .svn/ as a filtered resource. In the Properties dialog for your workspace or for your project, go to: Java Compiler | Building and add ".svn" to the list of 'Filtered resources:' under 'Output folder'.

I haven't tried it but I wouldn't be surprised if installing one of the subversion plugins for eclipse also filters the .svn directories for you so anyone with a subversion plugin installed wouldn't notice this problem.




回答2:


After a long search, starting from this and similar posts I finally fixed this with the help of http://www.damonkohler.com/2009/07/make-eclipse-ignore-svn-directories.html

The source folder pattern that worked for me is slightly different then the one given on the blog however, namely "****/.svn/"** instead of "****/.svn***"

Without the first step, the second step (which has also been mentioned before as a solution) has no effect according to my experience. Thanks Daemon!

The recipe:

1. Project > Properties > Java Build Path For each source folder, edit Excluded to include the pattern "****/.svn/"**

2. Project > Properties > Java Compiler > Building > Enable project specific settings Check the box.

Project > Properties > Java Compiler > Building > Output folder > Filtered resources Add ".svn/" so that it reads "*.launch, .svn/"




回答3:


Which SVN plugin are you using? Subclipse or Subversive? It is not an Eclipse problem per se, but rather it sounds like a problem with the particular eclipse plugin you are using for SVN. It could be that there needs to be a problem report written for that plugin.




回答4:


Hmm that is very strange indeed. Goto your plugins directory or look at Help > About Eclipse and check to see which plugins you have installed. Look for something with svn, subversion, or polarion, if they are there then you probably have an issue with that plugin interfering.

If not, I think you could have something going on with your installation of subversion(Tortoise SVN). It would then be very very unlikely Eclipse is causing this issue.

Btw, I have seen miscellaneous issues with not only Eclipse SVN plugin support (I wish the svn plugins were half as good as Eclipse CVS support), but with the command line subversion tools sometimes. It could be an issue with the version of Subversion you are using or something you are doing/not doing with svn. Check to make sure that the property svn:ignore is set correctly. You can do that with svn pl, don't be surprised if the property is not set correctly to ignore bin. Remember the delimiter in that case is not comma, but a new line.

Good Luck




回答5:


Non of the above worked for me, but trashing and re-creating the eclipse project did:

  • Delete your project from eclipse (not from disk).
  • "File"->"New.."->"Project"->"Android Project"
  • in "New Adroid Project"-Dialog selected "create project from existing source" (find your project on HDD)->"Finish"

(as instructed from link)




回答6:


In my experience, installing Subversive prevents Eclipse from copying the .svn folders to the build directory.




回答7:


I am using Eclipse Photon with Totoise SVN 1.10.0 (on Windows 10-64 bit), I have faced the above problem, the solution that worked for me was to include an exclusion filter to src -> build path -> Configure Inclusion/Exclusion Filter (as mentioned by Gid partly above, the pattern mentioned did not work for me), however, for me it was enough to include the exclusion filter, the pattern I used is ".svn/", refer image below.



来源:https://stackoverflow.com/questions/1323121/eclipse-svn-ignore-bin

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!