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:
You need the redirector
Since Ant 1.6.3 it has an option called alwayslog
.
Use it like this:
<exec executable="mycommand">
<redirector output="myfile.txt" alwayslog="true"/>
</exec>