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

Jansi messes up System.err and System.out

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.8.2, 4.0.0, 4.0.0-alpha-1
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Java 1.8.0_131, Ubuntu 17.04

      Description

      I use the Maven Exec Plugin to run a class that asks for interactive input from the user. This was working in 3.3.9, but does not work in 3.5.0.

      Anything printed on System.err or System.out without a newline is not printed immediately on the terminal window.

      Example:

      BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
      System.err.printf("listen port: ");
      String value = console.readLine().trim();
      

      The example above would not print listen port: on the terminal.

      Attached you can find a project that reproduces this issue.
      Unpack the project and then run:

      $ mvn install && mvn exec:exec
      

      The expected output of the reproducer would be:

      err.println
      out.println
      err.printerr.printfout.printout.printf
      

      instead I get:

      err.println
      out.println
      

      Removing jansi-1.13.jar from $MAVEN/lib/ fixes the issue.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              martinkanters Martin Kanters
              Reporter:
              sbordet Simone Bordet

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment