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

Color output no longer possible on dumb terminals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.x-candidate
    • 4.0.0
    • Logging
    • None

    Description

      We have a couple of integration tests for how our tool captures Maven console output, including color. These tests capture Maven's output in a ByteArrayOutputStream, which results in a "dumb terminal". With Maven 3.x, we still get color output. With the latest 4.x nightlies, the output is no longer colored. I dug through the code a bit and it seems to be related to the change to JLine. I tried adding `-Djansi.mode=force` to the MAVEN_OPTS, but that didn't bring coloring back.

      You can try this yourself by doing `export TERM=dumb`, followed by any Maven command. The output is uncolored, even though Maven itself says `Message scheme: color`

      To be clear, I think having no color on dumb terminals is the correct default, but there should be a switch to bring it back for testing purposes. If there already is, please let me know how.

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            oehme Stefan Oehme
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: