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

Exception parsing Spy log when Job name contains invalid XML characters (like "--")


      The plugin fails to parse the Spy logs when the Job name contains characters not accepted in XML comments.

      To reproduce the error it is enough to create a job with name TEST--job. The following message will appear in the Jenkins logs after the build finishes:

      ERROR: [withMaven] WARNING Exception parsing the logs generated by the Jenkins Maven Event Spy /srv/jslave/workspace/TEST--job@tmp/withMavena4ea94cc/maven-spy-20170920-180259-419.log, ignore file.  Please report a bug associated for the component 'pipeline-maven-plugin' at https://issues.jenkins-ci.org 
      ERROR: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 33; The string "--" is not permitted within comments.

      The plugin stores the job name as an XML comment in the Spy log and the job name is made of invalid characters for an XML comment.

      Tested with pipeline-maven-plugin version 3.0.0

            cleclerc Cyrille Le Clerc
            brenuart Bertrand Renuart
            0 Vote for this issue
            3 Start watching this issue