【发布时间】:2015-07-30 09:33:03
【问题描述】:
我有一个任务 - 从列表中删除文件,该列表存储在一个文件中。 为此,我想使用 Groovy 脚本。 在 Ant 中,我使用以下目标没有问题:
<delete failonerror="false" verbose="true">
<resourcelist >
<file file="/path/to/file"/>
</resourcelist>
</delete>
但在 Groovy 脚本中导致错误:
ant.delete(
failonerror: "false",
verbose: "true",
ant.resourcelist(
ant.file(
file: "/path/to/file"
)
)
)
错误:
The <resourcelist> type doesn't support nested text data ("/path/to/file").
如何配置 Groovy skipt 以从位于另一个文件的列表中删除文件?提前致谢。
【问题讨论】:
-
我尝试过的一切 - 包含许多自定义代码。你能给出最好的解决方案吗