2

When I run a Maven command, it's normal in the terminal. But there is a problem when I redirect the output to a file like this:

mvn install > file.log

When I open the file, I see:

[[1;34mINFO[m] Scanning for projects...
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m

Does anyone know what the problem is? My Ubuntu is 17.10.

Zanna
  • 72,312
Roknauta
  • 300
  • 3
  • 16

1 Answers1

4

The program mvn, whatever it is, wants to colorize its output and seems to do this even if standard output is not a terminal. Look for an option to disable colorizing the output.

Hat tip to @Douglas: it appears that the required option is mvn -B.

AlexP
  • 10,435