• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jacoco-plugin
    • None

      The plugin can fail with a maven multi-module project, that has duplicate source files in different modules.

      For example, if two projects define com/somepackage/package-info.java, the first one is copied to the target jacoco/sources directory, its permissions are set to read only, and so the second one fails ...

      hudson.util.IOException2: Failed to extract /home/jenkins/workspace/Maven Build/Diffusion/Main/modules/module1/src/main/java/**/*
      	at hudson.FilePath.readFromTar(FilePath.java:2041)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1953)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1858)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:1843)
      	at hudson.plugins.jacoco.JacocoReportDir.saveSourcesFrom(JacocoReportDir.java:46)
      	at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:350)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
      	at hudson.model.Run.execute(Run.java:1622)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:247)
      Caused by: java.io.FileNotFoundException: /home/tester/.jenkins/jobs/Maven Build/builds/2013-09-16_10-22-57/jacoco/sources/com/somepackage/package-info.java (Permission denied)
      	at java.io.FileOutputStream.open(Native Method)
      	at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
      	at java.io.FileOutputStream.<init>(FileOutputStream.java:145)
      	at hudson.util.IOUtils.copy(IOUtils.java:35)
      	at hudson.FilePath.readFromTar(FilePath.java:2031)
      

      A general solution to this problem is for the plugin to associate each exec file with a separate source directory.

          [JENKINS-19594] Separate source directories

            ognjenb Ognjen Bubalo
            philipa Philip Aston
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: