如果存在 DML.sql 文件,我需要将所有 dml.sql 文件复制到 DB2_List.txt 文件中。但是在执行这个文件之后,我得到了这样的错误:复制不支持嵌套的“if”元素。
如果您对 Ant 中的嵌套循环有更好的了解,请告诉我。
<available file="DB/DML.sql" property="db.check.present"/>
<copy file="DB/DDL.sql" tofile="DB2/DB2_List.txt" >
<if>
<equals arg1="${db.check.present}" arg2="true"/>
<then>
<filterchain>
<concatfilter append="DB/DML.sql" />
<tokenfilter delimoutput="${line.separator}" />
</filterchain>
</then>
</if>
</copy>