[JIRA] (JENKINS-61791) Failed to read XML file produced by maven spy after an execution threw an exception and color is enabled

4 views
Skip to first unread message

bertrand.renuart@itma.lu (JIRA)

unread,
Apr 2, 2020, 6:10:03 PM4/2/20
to jenkinsc...@googlegroups.com
Bertrand Renuart created an issue
 
Jenkins / Bug JENKINS-61791
Failed to read XML file produced by maven spy after an execution threw an exception and color is enabled
Issue Type: Bug Bug
Assignee: Alvaro Lobato
Attachments: pom.xml
Components: pipeline-maven-plugin
Created: 2020-04-02 22:09
Environment: pipeline-maven-plugin: 3.8.2
Priority: Minor Minor
Reporter: Bertrand Renuart

The plugin fails to read the XML log file produced by the maven spy under the following circumstances:

  • maven is executed with ANSI color enabled
  • a plugin execution fails to execute 

The maven spy captures the exception thrown by the failed execution and writes it asis in its XML log file. Unfortunately, it appears that the exception message contains ANSI color escape codes when maven is executed with coloring enabled. These escape codes are not valid XML content hence causing the failure to read back the XML log file.

The issue can be easily reproduced with the attached sample pom.xml.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

bertrand.renuart@itma.lu (JIRA)

unread,
Apr 2, 2020, 6:24:02 PM4/2/20
to jenkinsc...@googlegroups.com
Bertrand Renuart updated an issue
Change By: Bertrand Renuart
The plugin fails to read the XML log file produced by the maven spy under the following circumstances:
* maven is executed with ANSI color enabled
* a plugin execution fails to execute 


The maven spy captures the exception thrown by the failed execution and writes it asis in its XML log file. Unfortunately, it appears that the exception message contains ANSI color escape codes when maven is executed with coloring enabled. These escape codes are not valid XML content hence causing the failure to read back the XML log file.

The issue can be easily reproduced with the attached sample {{pom.xml}}.

Note: 

bertrand.renuart@itma.lu (JIRA)

unread,
Apr 2, 2020, 6:31:03 PM4/2/20
to jenkinsc...@googlegroups.com
Bertrand Renuart updated an issue
The plugin fails to read the XML log file produced by the maven spy under the following circumstances:
* maven is executed with ANSI color enabled
* a plugin execution fails to execute 

The maven spy captures the exception thrown by the failed execution and writes it asis in its XML log file. Unfortunately, it appears that the exception message contains ANSI color escape codes when maven is executed with coloring enabled. These escape codes are not valid XML content hence causing the failure to read back the XML log file.

The issue can be easily reproduced with the attached sample {{pom.xml}}.

----

Note:   according to issue JENKINS-55318, coloring is _not_ working because the plugin always invoke maven in batch mode. Our Jenkins installation is actually using a kind of post-processor that removes the --batch-mode argument from the generated wrapper script... so we have coloring working nicely.
Reply all
Reply to author
Forward
0 new messages