ant无法处理CVS目录的问题
原因是像CVS这样的一些特殊目录或文件被ant默认进行忽略。
看下边这个类,所有忽略的目录及文件都在这里列出来了。
org.apache.tools.ant.DirectoryScanner
protected static final String[] DEFAULTEXCLUDES = {
// Miscellaneous typical temporary files
"**/*~",
"**/#*#",
"**/.#*",
"**/%*%",
"**/._*",
// CVS
"**/CVS",
"**/CVS/**",
"**/.cvsignore",
// SCCS
"**/SCCS",
"**/SCCS/**",
// Visual SourceSafe
"**/vssver.scc",
// Subversion
"**/.svn",
"**/.svn/**",
// Mac
"**/.DS_Store"
};
我们可通过在build.xml中引入defaultexcludes 标记从默认忽略中去除我们用到的目录或
<defaultexcludes remove="**/CVS"/>
<defaultexcludes remove="**/CVS/**"/>
<defaultexcludes remove="**/.cvsignore"/>
关于defaultexcludes 标记的详细说明如下:
since Ant 1.6
*Description*Alters the default excludes for all subsequent processing in the build, and prints out the current default excludes if desired.
*Parameters*
| Attribute | Description | Required |
| echo | whether or not to print out the default excludes.(defaults to false) | attribute "true" required if no other attribute specified |
| default | go back to hard wired default excludes | attribute "true" required if no if no other attribute is specified |
| add | the pattern to add to the default excludes | if no other attribute is specified |
| remove | remove the specified pattern from the default excludes | if no other attribute is specified |
Print out the default excludes
<defaultexcludes echo="true"/>
Print out the default excludes and exclude all *.bak files in all further processing
<defaultexcludes echo="true" add="**/*.bak"/>
Silently allow several fileset based tasks to operate on emacs backup files and then restore normal behavior
<defaultexcludes remove="**/*~"/> (do several fileset based tasks here) <defaultexcludes default="true"/>
这次没有点加入到论坛,我看看到底怎么回事。
发表评论
- 浏览: 122067 次
- 性别:

- 来自: bj

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
[转]JSP语法的xml写法
...
-- by stonesfour -
【转】Java中的位运算符
太好了,谢谢楼主分享!
-- by qhncxf -
setTimeout和setInterval ...
setTimeout(function(parameter){return fu ...
-- by letle -
setTimeout和setInterval ...
其实你上面的用法是不规范的,用setTimeout或setInterval的时候 ...
-- by sheay -
html的DOCTYPE 问题
你
-- by zhengbin917943






评论排行榜