---
title: "Eclipse中不让.svn文件夹一同编译到class中"
author: "spiritfrog"
date: "2010-07-09T13:59:48Z"
tags: ["Eclipse", "SVN"]
categories: ["编程语言"]
slug: "eclipse-svn-class"
draft: false
lastmod: "2010-07-09T13:59:48Z"
id: 709097
url: "https://spiritfrog.iteye.com/blog/709097"
---

开发过程中一直在用SVN做版本控制，使用Eclipse编译文件后，classes文件中总是有.svn的文件夹，在做提交时有时会报错,这些文件没有什么用，而且影响build的速度。 更恼火的是， 如果一并更新工程，就会在class目录中更新到java文件。

 

怎样让eclipse编译时候不把.svn目录下的东西都copy到class下去呢？  
使用编译时过滤选项可以使编译时.svn不移到classess目录中,设置方法：   
"Project-&gt;Properties-&gt;Java Build Path"，右侧的面板中的"Source"选项卡，展开"source folder "后会看到"Included"、"Excluded"和"Native library location:",在Excluded中加入"\*\*/.svn/\*\*"，就可以将所有的svn文件排除在编译路径中了