ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Skipping JaCoCo execution due to missing execution data file #359

Closed WarWolflll closed 2 years ago

WarWolflll commented 2 years ago

Hello, I'm using VS Code for Java example. I am trying to create test coverage reports but getting "Skipping JaCoCo execution due to missing execution data file" when I run "mvn clean jacoco:prepare-agent install jacoco:report". Can anyone help with this?

ryanluker commented 2 years ago

@WarWolflll Thanks for submitting a ticket! I haven't tinkered with the java example in a long while, so it could be out of date or not working any more 🤔.

I did try it just now with a fresh Linux codespace and the instructions here worked fine. https://github.com/ryanluker/vscode-coverage-gutters/tree/master/example/java#build

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.549 s
[INFO] Finished at: 2022-03-30T03:46:41Z
[INFO] ------------------------------------------------------------------------
@ryanluker ➜ .../vscode-coverage-gutters/example/java/my-app (master) $ mvn jacoco:report
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< com.mycompany.app:my-app >----------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.2:report (default-cli) @ my-app ---
[INFO] Loading execution data file /workspaces/vscode-coverage-gutters/example/java/my-app/target/jacoco.exec
[INFO] Analyzed bundle 'my-app' with 1 classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.755 s
[INFO] Finished at: 2022-03-30T03:46:54Z
[INFO] ------------------------------------------------------------------------
@ryanluker ➜ .../vscode-coverage-gutters/example/java/my-app (master) $ ls
cov.xml  pom.xml  src  target
@ryanluker ➜ .../vscode-coverage-gutters/example/java/my-app (master) $ mv target/site/jacoco/
com.mycompany.app/    index.html            jacoco.csv            jacoco-resources/     jacoco-sessions.html  jacoco.xml            
@ryanluker ➜ .../vscode-coverage-gutters/example/java/my-app (master) $ mv target/site/jacoco/jacoco.xml cov.xml
@ryanluker ➜ .../vscode-coverage-gutters/example/java/my-app (master ✗) $ ls
cov.xml  pom.xml  src  target
@ryanluker ➜ .../vscode-coverage-gutters/example/java/my-app (master ✗) $ 

Can you provide anymore info around operating system etc?

ryanluker commented 2 years ago

Closing due to inactive, but can be reopened.