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

Peter commented on MNG-6417:
----------------------------

Jansi native library loaded from 
/var/folders/nm/p4l7xlw97gvd9wyyb1w5yz_80000gn/T/libjansi-1.17.1-8690095776571169633.jnilib
 which was auto-extracted from 
jar:file:/Users/peter/.m2/repository/org/fusesource/jansi/jansi/1.17.1/jansi-1.17.1.jar!/META-INF/native/osx/libjansi.jnilib

os.name= Mac OS X, os.version= 10.14.2, os.arch= x86_64
file.encoding= UTF-8
java.version= 1.8.0_191, java.vendor= Oracle Corporation, java.home= 
/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre

jansi.passthrough= false
jansi.strip= false
jansi.force= false
org.fusesource.jansi.Ansi.disable= false

IS_WINDOWS: false

{color:#FF0000}isatty(STDOUT_FILENO): 0, System.out is *NOT* a terminal{color}
{color:#FF0000}isatty(STDERR_FILENO): 0, System.err is *NOT* a terminal{color}

Resulting Jansi modes for stout/stderr streams:
 - System.out: PASSTHROUGH
 - System.err: PASSTHROUGH
modes description:
1. PASSTHROUGH: just pass through, ANSI escape codes are supposed to be 
supported by terminal
2. RESET_ANSI_AT_CLOSE: like pass through but reset ANSI attributes when 
closing the stream
3. STRIP_ANSI: strip ANSI escape codes, for example when output is not a 
terminal
4. WINDOWS: detect ANSI escape codes and transform Jansi-supported ones into a 
Windows API to get desired effect (since ANSI escape codes are not natively 
supported by Windows terminals like cmd.exe or PowerShell)

test on System.out: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
 bright: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
 bold: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
test on System.err: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
 bright: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT
 bold: BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE DEFAULT

┌──┐┌─────┐ ┌─────┐ ┌──────┬──┐
 │██├┘█████└┬┘█████└┬┘██████│̦│
 ┌──┐ │██│██▄▄▄██│██┌─┐██│██▄▄▄▄ │▄▄│
 │▒▒└─┘▒█│▒█┌─┐▒█│▒█│ │▒█│ ▀▀▀▀▒█│▒█│
 └┐▓▓▓▓▓┌┤▓▓│ │▓▓│▓▓│ │▓▓│▀▓▓▓▓▓▀│▓▓│
 └─────┘└──┘ └──┴──┘ └──┴───────┴──┘

> unable to print any colored text in netbeans using maven 3.5.3
> --------------------------------------------------------------
>
>                 Key: MNG-6417
>                 URL: https://issues.apache.org/jira/browse/MNG-6417
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Peter
>            Priority: Minor
>             Fix For: waiting-for-feedback
>
>
> unable to print any colored text in netbeans using maven 3.5.3, i am using 
> these code to test
> {code:java}
> @Test
>  public void test() throws Exception {
>  String ANSI_RESET = "\u001B[0m";
>  String ANSI_RED = "\u001B[31m";
>  System.out.print(ANSI_RED + "XX");
>  System.out.flush();
>  System.out.println(ANSI_RESET);
>  System.out.println("\033[31;1mHello\033[0m, \033[32;1;2mworld!\033[0m");
>  System.out.println((char) 27 + "[31m" + "ERROR MESSAGE IN RED");
> // System.out.println((char) 27 + "[33mYELLOW");
>  AnsiConsole.systemInstall();
>  System.out.println(ansi().eraseScreen().render("@|red Hello|@ @|green 
> World|@"));
>  System.out.println(ansi().fg(GREEN).a("Hello").fg(BLUE).a(" World").reset());
>  }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to