You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2018/12/29 10:39:00 UTC

[jira] [Comment Edited] (MNG-6417) unable to print any colored text in netbeans using maven 3.5.3

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

Hervé Boutemy edited comment on MNG-6417 at 12/29/18 10:38 AM:
---------------------------------------------------------------

Here you go, it was able to print colored text using maven 3.3.0, but not latest maven.

{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}


was (Author: mcheung63):
Here you go, it was able to print colored text using maven 3.3.0, but not latest maven.

@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());
 }

> 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
> {noformat}
> @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());
>  }
> {noformat}



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