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

Error in Publishing Scoverage XML and HTML report...

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • scoverage-plugin
    • None

      Hi Team,

      I am getting error in server while publishing scoverage xml and html report.

      java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near
      index 31
      href=".*scoverage-report\views\html\pages/
      ^
      at java.util.regex.Pattern.error(Pattern.java:1924)
      at java.util.regex.Pattern.escape(Pattern.java:2416)
      at java.util.regex.Pattern.atom(Pattern.java:2164)
      at java.util.regex.Pattern.sequence(Pattern.java:2097)
      at java.util.regex.Pattern.expr(Pattern.java:1964)
      at java.util.regex.Pattern.compile(Pattern.java:1665)
      at java.util.regex.Pattern.<init>(Pattern.java:1337)
      at java.util.regex.Pattern.compile(Pattern.java:1022)
      at java.lang.String.replaceAll(String.java:2162)
      at org.jenkinsci.plugins.scoverage.ScoveragePublisher.processReport(Scov
      eragePublisher.java:93)
      at org.jenkinsci.plugins.scoverage.ScoveragePublisher.perform(ScoverageP
      ublisher.java:58)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBui
      ld.java:770)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildStep
      s(AbstractBuild.java:734)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.
      java:683)
      at hudson.model.Run.execute(Run.java:1765)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)

      In Scoverage publisher class at line 93 the code is FileUtils.writeStringToFile(f, content.replaceAll("href=\".*" + pattern + "/", "href=\"")); for some reason, exception is thrown at this point and rest code does not execute therfore in jenkins, right side graph and coverage graph for scoverage not working (I guess).

      Do you know why am I failing or what the problem is?

      I have used sbt plugin and to deploy on jenkins, used scoverage plugin.

      Thanks
      AK

            Unassigned Unassigned
            akkum Akhilesh Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: