【发布时间】:2011-12-19 10:31:32
【问题描述】:
我的问题是,我必须从 xml 文件中读取复制作业的源路径,然后将从 xml 文件读取的该目录中的所有文件复制到另一个目录。
因为代码不仅仅是文字:
<xmltask source="${projectfile}">
<copy path="Project/RecentResultsInfo/ResultsDirectoryOfRecentLoadTest/text()" property="recentdir" attrValue="true"/>
</xmltask>
<copy todir="${targetdirectory}">
<fileset dir="${recentdir}"/>
</copy>
运行此目标时的输出是: C:\develop\build.xml:44: 警告:找不到要复制的资源文件“C:\develop\C:\Programme\tool\test_90\”。
似乎在它无法识别的文件集中,recentdir 包含一个完整路径。来自应用程序的写入 xml 在使用路径读取的 xml 文件中的路径之前和之后都有一个换行符。所以 ant 无法识别路径,因为它前面有一个换行符。
蚂蚁有什么修剪之类的吗?
谁能帮我让蚂蚁接受这条路?
【问题讨论】:
标签: ant