You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Simone Bordet (Jira)" <ji...@apache.org> on 2021/08/10 14:09:00 UTC

[jira] [Commented] (MNG-6239) Jansi messes up System.err and System.out

    [ https://issues.apache.org/jira/browse/MNG-6239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17396701#comment-17396701 ] 

Simone Bordet commented on MNG-6239:
------------------------------------

FTR, Maven 3.8.1 ships Jansi 1.17.1 so the problem is still present.

Manually updating to Jansi 2.3.4 solves the problem.

Why is Maven 3.8.1 still shipping such an old version of Jansi?  

> Jansi messes up System.err and System.out
> -----------------------------------------
>
>                 Key: MNG-6239
>                 URL: https://issues.apache.org/jira/browse/MNG-6239
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.5.0
>         Environment: Java 1.8.0_131, Ubuntu 17.04
>            Reporter: Simone Bordet
>            Assignee: Martin Kanters
>            Priority: Minor
>             Fix For: 3.8.2, 4.0.0, 4.0.0-alpha-1
>
>         Attachments: mvn-jansi.tgz
>
>
> 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:
> {code:java}
> BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
> System.err.printf("listen port: ");
> String value = console.readLine().trim();
> {code}
> 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:
> {noformat}
> $ mvn install && mvn exec:exec
> {noformat}
> The expected output of the reproducer would be:
> {noformat}
> err.println
> out.println
> err.printerr.printfout.printout.printf
> {noformat}
> instead I get:
> {noformat}
> err.println
> out.println
> {noformat}
> Removing {{jansi-1.13.jar}} from {{$MAVEN/lib/}} fixes the issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)