如何在不隐藏控制台的情况下将Maven输出记录到文件? [英] How to log maven output to a file and without hiding console?

查看:75
本文介绍了如何在不隐藏控制台的情况下将Maven输出记录到文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Maven输出保存到文件中,但又不丢失输出到控制台.不能选择使用tee,因为我是在Windows下运行的,而且我也不想在源代码树中添加二进制tee.exe.

I want to save maven output to a file, but without loosing the output to console. Usage of tee is not an option because I run under Windows and also I do not want to add a binary tee.exe to the source tree.

推荐答案

如果使用的是Linux.您可以使用bellow命令. mvn install -X | tee log.txt

If you are using linux. you can use the bellow command. mvn install -X | tee log.txt

这篇关于如何在不隐藏控制台的情况下将Maven输出记录到文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆