I explicitly added the path to the compiled classes and the plugin now 
works. The incorrect path may be a default path in the plugin that it used 
when I didn't explicitly provide one.

On Tuesday, February 13, 2018 at 12:52:59 PM UTC-6, Daniel Watrous wrote:
> I have tried to introduce jacoco into my build pipeline, but it fails and 
> I can't find anything online to help me understand why. The plugin itself 
> appears to work, but they it complains that it can't access the files. 
> Here's a snippet of the error stacktrace.
> [Pipeline] { (Code coverage (jacoco))[Pipeline] jacoco[JaCoCo plugin] 
> Collecting JaCoCo coverage data...
> [JaCoCo plugin] **/target/**.exec;**/classes;**/src/main/java; locations are 
> configured
> [JaCoCo plugin] Number of found exec files for pattern **/target/**.exec: 1
> [JaCoCo plugin] Saving matched execfiles:  
> /home/jenkins/workspace/elopment_automation_jenkins-DUMUCGCV43HJK2LF4OUPIWNQHCBBPCZUYH3HIEXOZKSSQM4BXWQA/target/jacoco.exec
> [JaCoCo plugin] Saving matched class directories for class-pattern: 
> **/classes: 
> [JaCoCo plugin]  - 
> /home/jenkins/workspace/elopment_automation_jenkins-DUMUCGCV43HJK2LF4OUPIWNQHCBBPCZUYH3HIEXOZKSSQM4BXWQA/target/api-termination/WEB-INF/classes
>  130 files[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // 
> node[Pipeline] }[Pipeline] // podTemplate[Pipeline] End of 
> Pipelinejava.nio.file.AccessDeniedException: 
> /var/jenkins_home/jobs/api-termination/jobs/api-termination-automation-development/branches/automation-jenkins.4nehn8/builds/42/jacoco/classes/com/company/common/AuditActn.class
>       at 
> sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
>       at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
>       at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
>       at 
> sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
>       at 
> java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
>       at java.nio.file.Files.newOutputStream(Files.java:216)
>       at hudson.util.IOUtils.copy(IOUtils.java:39)
>       at hudson.FilePath.readFromTar(FilePath.java:2307)
> Also:         Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call 
> to JNLP4-connect connection from
>                       at 
> hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
>                       at 
> hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
>                       at hudson.remoting.Channel$2.adapt(Channel.java:944)
> The AccessDeniedException is for a directory that doesn't exist: 
> /var/jenkins_home... I'm not sure if the jacoco plugin is trying to 
> create that directory or if something else is suggesting that is a valid 
> directory.
> Any ideas to get this build working?

You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to