简体   繁体   English

在Eclipse中,如何排除某些文件(可能基于.svn扩展名或文件名)被复制到输出文件夹?

[英]In Eclipse, how can I exclude some files (maybe based on the .svn extension or filename) from being copied to the output folder?

I'm developing a Java application using Eclipse. 我正在使用Eclipse开发Java应用程序。 My project has two source directories that are both built and then some files are copied into the output folder. 我的项目有两个源目录,它们都是构建的,然后一些文件被复制到输出文件夹中。 From the output directory I then run my application and all works well. 从输出目录我然后运行我的应用程序,一切正常。

However, I keep having these warnings: 但是,我一直有这些警告:

Snapshot from Problems tab in Eclipse http://www.freeimagehosting.net/uploads/128c1af93f.png Eclipse中的Problems选项卡中的快照http://www.freeimagehosting.net/uploads/128c1af93f.png

Anyone know how to get rid of these warnings? 有谁知道如何摆脱这些警告? Maybe by excluding some files, maybe based on the .svn extension or filename, from the build process? 也许通过从构建过程中排除一些文件,可能基于.svn扩展名或文件名? If so, how would I go about excluding those? 如果是这样,我将如何排除这些?

Have you tried to add 你试过添加吗?

**/.svn/

to the Exclusion patterns at the Source preferences of the project's build path settings? 在项目的构建路径设置的Source首选项中的排除模式

您也可以尝试为Eclipse安装Subversion插件( Subclipse )。

Sure, that easy: at Project Properties -- Java Build Path you can add exclusion filters on every source folder. 当然,这很简单:在Project Properties - Java Build Path中,您可以在每个源文件夹上添加排除过滤器。 There, you can add an exclusion pattern as *.svn 在那里,您可以将排除模式添加为* .svn

That sounds like your building process is using versionned directory within your subversion workspace. 这听起来像您的构建过程在您的subversion工作区中使用版本化目录。

Should you not have your 'output' folder and/or your 'tst' folder be made 'private' ? 您是否应该将'output'文件夹和/或'tst'文件夹设为'private'? (that is without any .svn, and ignored by subversion) (没有任何.svn,被subversion忽略)

右键单击源文件>构建路径>排除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM