Reputation: 583
Error while running test coverage using Jacoco.
I am currently using operating system Windows 10 Professional, Java 8, Gradle.
CLI to execute test coverage report I am using the command:
gradlew sonarqube -Dsonar.projectKey=projectKey -Dsonar.host.url=http://localhost:9000 -Dsonar.login=c231ced071c19ae0ab12342dfgd3fa17e85fd6a5
While I am running jacoco to publish report in local sonarqube, I am getting the following error:
Error occurred during initialization of VM Error opening zip file or JAR manifest missing : build/tmp/expandedArchives/org.jacoco.agent-0.8.5.jar_6a2df60c47de373ea127d14406367999/jacocoagent.jar agent library failed to init: instrument Error occurred during initialization of VM Error opening zip file or JAR manifest missing : build/tmp/expandedArchives/org.jacoco.agent-0.8.5.jar_6a2df60c47de373ea127d14406367999/jacocoagent.jar agent library failed to init: instrument Process 'Gradle Test Executor 2' finished with non-zero exit value 1 org.gradle.process.internal.ExecException: Process 'Gradle Test Executor 2' finished with non-zero exit value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:417) at org.gradle.process.internal.worker.DefaultWorkerProcess.onProcessStop(DefaultWorkerProcess.java:141)
Please need your input to resolve this issue. Thanks in advance.
Upvotes: 5
Views: 5711
Reputation: 25
I had the same issue. I changed name of folders in file system to reduce the path to the project - it works for me.
Upvotes: 2
Reputation: 101
Run the next command gradlew clean build -d
, this takes a few seconds.
Then run this command gradlew --stop
.
Upvotes: 0