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

Fail by publishing report will fail whole build

XMLWordPrintable

      We encounter error by parsing file (there was character not supported by XML 1.0 version).
      On build overview PMD plugin show that there is problem ("During parsing an error has been reported.") but build end with success. Consequently number of warning drop to 0.
      It would be nice that information about failure will be throw to Jenkins so that it tell us, that something is wrong.

      Console output with error:

      [PMD] ./pmd_report.xml failed due to an exception:
      
      org.xml.sax.SAXParseException; lineNumber: 1224; columnNumber: 26; An invalid XML character (Unicode: 0x1f) was found in the element content of the document.
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1236)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
      	at org.apache.commons.digester.Digester.parse(Digester.java:1666)
      	at hudson.plugins.pmd.parser.PmdParser.parse(PmdParser.java:70)
      	at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:53)
      	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
      	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
      	at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      	at hudson.FilePath.act(FilePath.java:852)
      	at hudson.FilePath.act(FilePath.java:825)
      	at hudson.plugins.pmd.PmdPublisher.perform(PmdPublisher.java:139)
      	at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:146)
      	at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:331)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:732)
      	at hudson.model.Run.execute(Run.java:1568)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:236)
      

            mmenev Mihail Menev
            peto127 Peter Spireng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: