Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send maven output to file

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.

The command is:

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

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

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

Any idea what I am missing here?

like image 434
rapt Avatar asked Mar 15 '12 19:03

rapt


1 Answers

Try mvn -help

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

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

like image 139
Andrzej Jozwik Avatar answered Sep 21 '22 02:09

Andrzej Jozwik