将Maven输出发送到文件 [英] Send maven output to file

查看:108
本文介绍了将Maven输出发送到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 7上,我试图将 maven-3 命令的输出发送到文本文件.

On Windows 7, I am trying to send the output of a maven-3 command to a text file.

我从要分析的项目的根目录调用该命令.

I call the command from the root of the project I am trying to analyze.

命令是:

mvn dependency:tree -Dverbose -Dincludes=commons-collections -DoutputFile=C:\Users\myname\Documents\output.txt

当我运行不带outputFile参数的命令时,我看到输出已发送到控制台.

When I run the command without the outputFile parameter, I see the output sent to the console.

但是当我将它与outputFile参数一起使用时,输出文件为空.

But when I use it with the outputFile parameter, the output file is empty.

知道我在这里缺少什么吗?

Any idea what I am missing here?

推荐答案

尝试mvn -help

 -l,--log-file <arg>  Log file to where all build output will go.                               

mvn <your parameters> --log-file log.txt

这篇关于将Maven输出发送到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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