Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-3047

AINSI colors not showing as of maven 3.5

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 11.1
    • None
    • projects - Maven
    • Maven version after 3.5.0

    Description

      AINSI colors are not working in newer maven versions, they do work with the maven version shipped with netbeans.

      The solution is to add the following maven options

      MAVEN_OPTS=-Djansi.passthrough=true

      Maven 3.5.0 integrated jansi into its core. Jansi tries to detect the terminal capability and if it doesn't think that the terminal support ANSI codes, it strips them out of the output.

       

      Testcase:

      String greenBold = "\033[32;1m";
      String reset = "\033[0m";
      System.out.println("before" + greenBold + " green " + reset + "after");

      1. If you run the above program against Maven 3.3.9, the word "green" will render using a green color inside the Netbeans output tab.
      2. If you run the same program against Maven 3.5.0, no colors will show up.

       

      See old bug report : https://netbeans.org/bugzilla/show_bug.cgi?id=270593

      Attachments

        Activity

          People

            Unassigned Unassigned
            pgscada Mathieu Moloney
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: