【发布时间】:2012-07-17 07:26:02
【问题描述】:
我正在使用 exec-maven-plugin 执行一些特定的测试。我想将测试的控制台输出附加到文件中,而不隐藏控制台。
maven 中是否为该任务提供了任何支持?
我使用 maven-antrun-plugin 在测试开始之前执行记录器任务。那没有用。
我使用 'tee' 命令使用 exec-maven-plugin 执行。这似乎也不起作用。
我检查了使用带有 maven 的 log4j。但由于我是 log4j 日志记录的新手,我无法用它调试问题。
还有其他方法吗?
【问题讨论】:
-
这很难。当你使用
tee时发生了什么? -
我将
tee作为<execution>之一执行,并使其在后台运行。但问题是,我无法将下一个<execution>的输出重定向到tee。这是我使用的代码。<execution> ... <executable>tee result.log</executable></execution><execution>...<executable>java</executable>...</execution>由于没有重定向,result.log 被创建,但它没有被填充。
标签: maven logging exec-maven-plugin