Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59114

Maven output is not colorized

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • ansicolor-plugin
    • None

      Hi,

       

      I am trying to use the Maven ansi color plugin to have the Jenkins log colorized the Maven output, but it fails.  Jenkins version is 2.162.

       

      I added to the pipe line the following code-

       

      options

      {         ansiColor('xterm')     }

       

          environment

      {         MAVEN_OPTS = '-Djansi.force=true'     }

       

       

      stage ('Build stage')

                                      {

                                                      steps

      {                                                                                                                 bat 'mvn -version'                                                                 bat 'mvn -Dstyle.color=always clean install'                                                                                                                 }

                                     

                                      }

      The Maven itself is version 3.5.4, but the Jenkins result is without colors

        1. JenkinsNoColors.PNG
          33 kB
          Eyal Goren
        2. MavenColors.PNG
          75 kB
          Eyal Goren

            Unassigned Unassigned
            eyalg1972 Eyal Goren
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: