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

Jacoco Plugin 3.0.1 fails build as basedir now incorrect

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: jacoco-plugin
    • Labels:
    • Environment:
    • Similar Issues:
    • Released As:
      3.0.4

      Description

      All builds under jacoco plugin 2.2.1 work fine, as soon as i update to 3.0.1 all jobs with jenkins  jacoco plugin start failing.

      I can see now that the 3.0.1 plugin seems to expect the classes to be in build/${BUILD_NUMBER}/jacoco/classes

      whereas my jacoco build folder is set to build/jacoco/

      If i downgrade back to version 2.2.1 it all works again

       

       

       
      Recording test results
      [JaCoCo plugin] Collecting JaCoCo coverage data...
      [JaCoCo plugin] build/jacoco/*.exec;build/classes/main;*/src; locations are configured
      [JaCoCo plugin] Number of found exec files for pattern build/jacoco/**.exec: 1
      [JaCoCo plugin] Saving matched execfiles: /home/jenkins/Documents/jenkins_workspace/workspace/IwTurnFramework/build/jacoco/test.exec
      [JaCoCo plugin] Saving matched class directories for class-pattern: build/classes/main:
      [JaCoCo plugin] Saving matched source directories for source-pattern: **/src:
      [JaCoCo plugin] - /home/jenkins/Documents/jenkins_workspace/workspace/IwTurnFramework/src 1012 files
      [JaCoCo plugin] Loading inclusions files..
      [JaCoCo plugin] inclusions: [**/*.class]
      [JaCoCo plugin] exclusions: []
      ERROR: Build step failed with exception
      java.lang.IllegalStateException: basedir /Volumes/jenkins/Jenkins/Home/jobs/IwTurnFramework/builds/512/jacoco/classes does not exist
      at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:281)
      at org.codehaus.plexus.util.FileUtils.getFileAndDirectoryNames(FileUtils.java:1940)
      at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1868)
      at org.codehaus.plexus.util.FileUtils.getFileNames(FileUtils.java:1850)
      at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1825)
      at org.codehaus.plexus.util.FileUtils.getFiles(FileUtils.java:1808)
      at hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:124)
      Caused: java.lang.RuntimeException: While reading class directory: /Volumes/jenkins/Jenkins/Home/jobs/IwTurnFramework/builds/512/jacoco/classes
      at hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:131)
      at hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:137)
      at hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:110)
      at hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction.java:339)
      at hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java:326)
      at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:631)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1752)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Build step 'Record JaCoCo coverage report' marked build as failure

        Attachments

          Issue Links

            Activity

            Hide
            michaelkotten Michael Kotten added a comment -
            Show
            michaelkotten Michael Kotten added a comment - I fixed this in  https://github.com/jenkinsci/jacoco-plugin/pull/100
            Hide
            michaelkotten Michael Kotten added a comment -

            centic Did you have a look at the changes?

             

            Show
            michaelkotten Michael Kotten added a comment - centic Did you have a look at the changes?  
            Hide
            centic centic added a comment - - edited

            Change is merged to master now, will be released as part of 3.0.3

            Show
            centic centic added a comment - - edited Change is merged to master now, will be released as part of 3.0.3
            Hide
            alan_czajkowski Alan Czajkowski added a comment -

            it's been a month, when will the next release happen that incorporates this fix?

            Show
            alan_czajkowski Alan Czajkowski added a comment - it's been a month, when will the next release happen that incorporates this fix?
            Hide
            centic centic added a comment -

            This is available now with release 3.0.4

            Show
            centic centic added a comment - This is available now with release 3.0.4

              People

              • Assignee:
                centic centic
                Reporter:
                dellgreen Dell Green
              • Votes:
                4 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: