Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.2-candidate
    • Component/s: Command Line
    • Labels:
      None
    • Environment:
      Cygwin. For example, my uname currently says:

      CYGWIN_NT-10.0 Beren 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 Cygwin

      Description

      Full description and workaround here: https://binkley.blogspot.com/2017/04/maven-color-logging-on-cygwin.html

      In short: the JANSI library used in Maven 3.5.0 does not detect Cygwin, and falls back to no color. There is a workaround (Zart Colwing): Add -Djansi.passthrough=true to MAVEN_OPTS.

      As the mvn script understands Cygwin, it would be helpful to add the passthrough flag automatically. (Of course, there may need to be some smarts about batch and logging modes, and checking if stdout is a console vs pipeline.)

      Apologies: I'm unsure how to issue a PR for the maven repo.

        Issue Links

          Activity

          Hide
          hboutemy Hervé Boutemy added a comment -

          forcing color from Maven side is not an option: the option is to fix JAnsi
          Did you open an issue or even a PR against JAnsi?
          We'll integrate fixed JAnsi release.

          Notice that for future Maven 3.5.1, we already integrated a new JAnsi release that should fix some issues: did you check if Maven 3.5.1-SNAPSHOT is ok in your conditions?

          Show
          hboutemy Hervé Boutemy added a comment - forcing color from Maven side is not an option: the option is to fix JAnsi Did you open an issue or even a PR against JAnsi? We'll integrate fixed JAnsi release. Notice that for future Maven 3.5.1, we already integrated a new JAnsi release that should fix some issues: did you check if Maven 3.5.1-SNAPSHOT is ok in your conditions?
          Hide
          binkley Brian Oxley added a comment -

          Please note, this work around seems effective, at least for me:

          https://plus.google.com/111012722058314768782/posts/Z8ufa5LS6nv

          Perhaps while waiting on JAnsi change for Cygwin, the mvn script could be updated to include adding `-Djansi.passthrough=true` to MAVEN_OPTS?

          Show
          binkley Brian Oxley added a comment - Please note, this work around seems effective, at least for me: https://plus.google.com/111012722058314768782/posts/Z8ufa5LS6nv Perhaps while waiting on JAnsi change for Cygwin, the mvn script could be updated to include adding `-Djansi.passthrough=true` to MAVEN_OPTS?
          Hide
          hboutemy Hervé Boutemy added a comment -

          thanks for your positive report
          On adding the option to mvn script, I fear this is not an option: this would affect any Unix user (Linux, Mac, FreeBSD, ...) and not only Windows+Cygwin users
          Notice that, after releasing Maven 3.5.1 where we have MNG-6282 that is a wider regression, if we release Maven 3.5.2 without Jansi fix, I'll add in Maven the workaround code I proposed in https://github.com/fusesource/jansi/issues/94#issuecomment-329977920
          Then whatever happens, Maven will have an improved Jansi detection, be it done at any level

          Show
          hboutemy Hervé Boutemy added a comment - thanks for your positive report On adding the option to mvn script, I fear this is not an option: this would affect any Unix user (Linux, Mac, FreeBSD, ...) and not only Windows+Cygwin users Notice that, after releasing Maven 3.5.1 where we have MNG-6282 that is a wider regression, if we release Maven 3.5.2 without Jansi fix, I'll add in Maven the workaround code I proposed in https://github.com/fusesource/jansi/issues/94#issuecomment-329977920 Then whatever happens, Maven will have an improved Jansi detection, be it done at any level
          Hide
          binkley Brian Oxley added a comment -

          Ah, just so. Were the passthrough flag to be added, it would be with a uname check for Cygwin.

          Show
          binkley Brian Oxley added a comment - Ah, just so. Were the passthrough flag to be added, it would be with a uname check for Cygwin.
          Hide
          binkley Brian Oxley added a comment -

          To be specific:

          *$ diff mvn-original mvn
          183a184,189
          > if $cygwin || $mingw; then
          >   if [ -t 1 ]; then
          >     MAVEN_OPTS="-Djansi.passthrough=true $MAVEN_OPTS"
          >   fi
          > fi
          >
          
          Show
          binkley Brian Oxley added a comment - To be specific: *$ diff mvn-original mvn 183a184,189 > if $cygwin || $mingw; then > if [ -t 1 ]; then > MAVEN_OPTS="-Djansi.passthrough=true $MAVEN_OPTS" > fi > fi >
          Hide
          hboutemy Hervé Boutemy added a comment - - edited

          ok, I:

          • didn't remember these $cygwin and $mingw variables that were available in mvn shell script
          • didn't think about the test -t DESCRIPTOR to detect terminal

          ok, if I need to code a workaround for Maven 3.5.2, I buy your implementation which is perfect
          thanks for the detailed hint

          Show
          hboutemy Hervé Boutemy added a comment - - edited ok, I: didn't remember these $cygwin and $mingw variables that were available in mvn shell script didn't think about the test -t DESCRIPTOR to detect terminal ok, if I need to code a workaround for Maven 3.5.2, I buy your implementation which is perfect thanks for the detailed hint

            People

            • Assignee:
              Unassigned
              Reporter:
              binkley Brian Oxley
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development