[JIRA] (JENKINS-59114) Maven output is not colorized

0 views
Skip to first unread message

eyalg1972@gmail.com (JIRA)

unread,
Aug 27, 2019, 11:23:02 PM8/27/19
to jenkinsc...@googlegroups.com
Eyal Goren created an issue
 
Jenkins / Bug JENKINS-59114
Maven output is not colorized
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: JenkinsNoColors.PNG, MavenColors.PNG
Components: ansicolor-plugin
Created: 2019-08-28 03:22
Priority: Minor Minor
Reporter: Eyal Goren

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

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

f.modler@gmx.net (JIRA)

unread,
Sep 11, 2019, 10:24:02 AM9/11/19
to jenkinsc...@googlegroups.com
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

eyalg1972@gmail.com (JIRA)

unread,
Sep 11, 2019, 11:54:02 AM9/11/19
to jenkinsc...@googlegroups.com

You can see in the description that the mvn command contains this parameter-

 

bat 'mvn -Dstyle.color=always clean install'

 

f.modler@gmx.net (JIRA)

unread,
Sep 11, 2019, 3:54:02 PM9/11/19
to jenkinsc...@googlegroups.com

Sorry, must have missed that. The formatting is a bit off, though.

This actually works for me. The one main difference is that I am using withMaven and then sh "mvn ...". And my Jenkins is running on CentOS 7, yours is a Windows machine...

eyalg1972@gmail.com (JIRA)

unread,
Sep 11, 2019, 4:00:02 PM9/11/19
to jenkinsc...@googlegroups.com

Can you show me a sample of declarative pipeline- how it should work? I will be happy to test it

eyalg1972@gmail.com (JIRA)

unread,
Sep 23, 2019, 2:44:02 PM9/23/19
to jenkinsc...@googlegroups.com

OK, when I use the pipeline maven integration plugin it does work, this issue can be closed

Reply all
Reply to author
Forward
0 new messages