我怎样才能重定向蚂蚁EXEC任务输出到两个文件和stdout?

问题描述:

我使用的是蚂蚁(1.8.2)EXEC任务启动一个子进程。我需要的子过程的输出被示为正常蚂蚁控制台输出的一部分,而且在一个文件中被捕获。

I am using the ant (1.8.2) exec task to start a child process. I need the output of the child process to be shown as part of the normal ant console output, but also be captured in a file.

您需要重定向

由于蚂蚁1.6.3它称为一个选项 alwayslog

Since Ant 1.6.3 it has an option called alwayslog.

使用这样的:

<exec executable="mycommand">
   <redirector output="myfile.txt" alwayslog="true"/>           
</exec>