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

0 Aufrufe
Direkt zur ersten ungelesenen Nachricht

eyalg1972@gmail.com (JIRA)

ungelesen,
27.08.2019, 23:23:0227.08.19
an 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)

ungelesen,
11.09.2019, 10:24:0211.09.19
an jenkinsc...@googlegroups.com
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

eyalg1972@gmail.com (JIRA)

ungelesen,
11.09.2019, 11:54:0211.09.19
an 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)

ungelesen,
11.09.2019, 15:54:0211.09.19
an 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)

ungelesen,
11.09.2019, 16:00:0211.09.19
an 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)

ungelesen,
23.09.2019, 14:44:0223.09.19
an jenkinsc...@googlegroups.com

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

Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten