ANT:fileset中使用exclude

it2022-05-09  25

ANT:fileset中使用exclude 2007-11-20 13:23 在Ant中使用copy任务是如果要忽略一些文件就需要使用fileset和excludes 复制一个目录中所有.java为结尾的文件,除去文件名含有Test字符的文件 <target name="copyfiles">                <copy todir="${dest.dir}" overwrite="true">            <fileset dir="${src.dir}">                <include name="**/*.java"/>              <exclude name="**/*Test*"/>            </fileset>         </copy> </target> 复制一个目录中所有文件,除去含有Test字符的目录 <target name="copyfiles">                <copy todir="${dest.dir}" overwrite="true">            <fileset dir="${src.dir}">              <exclude name="**/*Test*/**"/>            </fileset>         </copy> </target> 需要加/**

转载于:https://www.cnblogs.com/nanshouyong326/archive/2008/06/12/1218550.html


最新回复(0)