eclipse svn 忽略target .settings

这个build失败的解决方案就是不要把你项目的  target 目录放在 src repository  里面,还有  .project  和  .classpath  最好也别放到 src repository  里。

具体的做法就是在新建项目的时候,在第一次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 等等东西一个一个输入就可以了,这样貌似可以一劳永逸。。。

你可能感兴趣的:(eclipse,SVN)