具體的做法就是在新建項目的時候,在第一次commit 到 SVN 之前,先在項目的根目錄設置一個 SVN 屬性(我在eclipse 3.3 中,SVN插件是subclipse 1.4.0):
在eclipse中,右鍵點擊項目根目錄 Team -> Set Property ... 然後在彈出的對話框中,Property name 選 “svn:ignore”,Property Content 輸入:
target
.project
.classpath
.settings
就ok了。完了進入你的 SVN 的repository 裏把已經commit進去的target目錄和這兩個文件(.classpath .project) 刪除就可以了。
我是這樣了之後每次build都成功了,呵呵。
還有種辦法是在 Windows -> Preferences -> Team -> Ignored Resources裏點 “Add Pattern”,然後把 target 等等東西一個一個輸入就可以了,這樣貌似可以一勞永逸。。。
轉自:http://hi.baidu.com/moonjava/blog/item/5d1889f3b1b0d74a352acc0f.html