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

hudson-jacoco-plugin crashes if jacoco didn't run

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Right now the hudson-jacoco-plugin will crash if it is invoked atfter the build is done and the build didn't run jacoco. It should rather gracefully do nothing.

      The following exception occours:

      java.io.FileNotFoundException: ..../jacoco/classes (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:137)
      at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:181)
      at hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:110)
      at hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:116)

        Attachments

          Activity

          Hide
          ognjenb Ognjen Bubalo added a comment -

          Hi,

          I don't understand. The exception says that it couldn't find the path .../jacoco/classes. Is your configuration good?

          Thanks,
          Ogi

          Show
          ognjenb Ognjen Bubalo added a comment - Hi, I don't understand. The exception says that it couldn't find the path .../jacoco/classes. Is your configuration good? Thanks, Ogi
          Hide
          egore911 Christoph B added a comment -

          Yes, the configuration is fine.

          Let me gibe you a better example of how it happens: When a build process failed (e.g. due to a compile error in some java class or an error when downloading a maven dependency) and the maven-jacoco-plugin will not be executed you end up with a pretty empty target folder, which is also missing jacoco/classes.

          It's basically a followup error.

          Show
          egore911 Christoph B added a comment - Yes, the configuration is fine. Let me gibe you a better example of how it happens: When a build process failed (e.g. due to a compile error in some java class or an error when downloading a maven dependency) and the maven-jacoco-plugin will not be executed you end up with a pretty empty target folder, which is also missing jacoco/classes. It's basically a followup error.
          Hide
          centic centic added a comment -

          Can you post the relevant part of your configuration?

          Show
          centic centic added a comment - Can you post the relevant part of your configuration?
          Hide
          ognjenb Ognjen Bubalo added a comment -

          I fixed this. Tomorrow I will merge the last pull request, and build a pre release.

          Show
          ognjenb Ognjen Bubalo added a comment - I fixed this. Tomorrow I will merge the last pull request, and build a pre release.
          Hide
          centic centic added a comment -

          This should be included in release 1.0.13

          Show
          centic centic added a comment - This should be included in release 1.0.13

            People

            • Assignee:
              ognjenb Ognjen Bubalo
              Reporter:
              egore911 Christoph B
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: