Ant:将可执行文件的输出连接到其他一些文件而不创建临时文件?

时间:2012-05-21 19:49:54

标签: ant

请参阅下面的示例。

<concat destfile="dest-file">
    <fileset dir="dir1" />
    <!-- how to append the output of the executable below without creating a temporary file for that output? -->
    <apply executable="command1">...</apply>
</concat>

1 个答案:

答案 0 :(得分:3)

applyexec任务支持redirectors,因此您可以执行以下操作:

<apply executable="command1" >
    <redirector append="true" output="file.log" />
</apply>