Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.5.3
-
None
Description
When the output is not a TTY (e.g. on a CI server), the new option -Dstyle.color=always doesn't work, because JAnsi itself is disabling its color output.
# OK, produces color: mvn -B -Dstyle.color=always package # FAIL, doesn't produce color: mvn -B -Dstyle.color=always package | less -R # WORKAROUND: MAVEN_OPTS=-Djansi.force=true mvn -B -Dstyle.color=always package | less -R
The -Dstyle.color=always option needs to imply -Djansi.force=true – otherwise, "always" doesn't really mean always.
The problem for the implementation is, that the JAnsi option needs to be set as a system property way early during startup.