Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6380

Option -Dstyle.color=always doesn't force color output

    XMLWordPrintableJSON

    Details

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                hoeferh Henning Hoefer
              • Votes:
                5 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: