maven
maven copied to clipboard
[MNG-8334] Fix output redirection
JIRA issue: MNG-8334
- Fix empty output when using -l or redirecting output
- Fix incomplete log in file
Alternative PR to #1824 @cstamas, and it should fix both type of redirections (-l and shell stdout > redirection)
This PR is more in line with what I had in mind. In particular, this would allow stuff like the multiplexed output from mvnd where we display information to the terminal, but not the actual log output.
Looks good, the only strange thing is that mvn -v -l log.txt does not redirect (emit version to console). Also command mvn -v > log.txt sends ansi escapes to log file.
Resolve #9519