我是ANT新手: 我试图调试一个连接的ANT脚本,然后递归地编辑同一个文件。当我尝试运行它时,10个构建中的5个失败,并出现以下错误 java.io.FileNotFoundException:{PATH TO FILE} \ file.xml(访问被拒绝)
我尝试在每个步骤之前和之后添加延迟。但是,没有运气
任何帮助都将不胜感激。
<target name="concatxml">
<sleep seconds="1" />
<echo message="Concatenating file..." />
<concat destfile="${location}/file.xml">
<filelist dir="." files="${loc1}/file1.xml,${loc2}/file2.xml" />
</concat>
<echo message="Concatenating completed" />
<sleep seconds="1" />
<echo message="doImportReq.xml is released for concatenating..." />
</target>
<target name="replacevalxml">
<sleep seconds="1" />
<echo message="Replace initiated" />
<replace file="${location}/file.xml" token="@DOMAIN@" value="${dev}" />
<echo message="...replace completed />
<sleep seconds="1" />
</target>
答案 0 :(得分:0)
我注意到了这一点:
files="${loc1}/file1.xml,{loc2}/file2.xml"
那应该是${loc2}
而不是{loc2}
。我不知道这是不是问题......