排除jar中的文件或eclipse中的战争 [英] exclude files from jar or war in eclipse

查看:108
本文介绍了排除jar中的文件或eclipse中的战争的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

有没有办法告诉Eclipse不包括JAR或WAR中的指定文件,目录或模式? >您可以通过打开项目属性( alt-enter )指定包含和排除,然后打开 Java构建路径选项卡。在每个来源位置,有一个加号,点击,然后选择包括排除,然后选择编辑... 按钮。 / p>

源路径截图http://help.eclipse.org/ganymede/topic/org.eclipse.jdt.doc.user/gettingStarted/images/qs-WorkingWithExistingLayout26.png



然后,您可以指定要包含/排除的文件的多个模式。这些文件将不会被处理到输出目录。模式遵循 Ant的通配符模式,因此您对包含的内容进行了细致的控制。



include patterns screenshot http://archive.eclipse.org/eclipse/downloads/drops/R-3.0-200406251208/images/org.eclipse.jdt.ui/exclude.gif


Is there a way to tell Eclipse to not include specified files, directories, or patterns in a JAR or WAR?

解决方案

You can specify includes and excludes by opening the Project Properties (alt-enter) then opening Java Build Path and the Source tab. Against each source location there is a little plus sign, click on that then select Included or Excluded then select the Edit... button.

source path screenshot http://help.eclipse.org/ganymede/topic/org.eclipse.jdt.doc.user/gettingStarted/images/qs-WorkingWithExistingLayout26.png

You can then specify multiple patterns for files to be included/excluded. These files will not be processed to the output directory. The patterns follow Ant's wildcard patterns so you have quite fine-grained control over what to include.

include patterns screenshot http://archive.eclipse.org/eclipse/downloads/drops/R-3.0-200406251208/images/org.eclipse.jdt.ui/exclude.gif

这篇关于排除jar中的文件或eclipse中的战争的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆