1

I have a spring boot rest service(Spring-Boot-Jacoco-Example) and I followed https://www.eclemma.org/jacoco/trunk/doc/agent.html and downloaded org.jacoco.agent-0.8.4-.jar and set the following JAVA_OPTS in a windows machine

set JAVA_OPTS=-javaagent:C:\Workspace\org.jacoco.agent-0.8.4-.jar,append=true,includes=*,output=file,destfile=C:\Workspace\Github\Spring-Boot-Jacoco-Example\target\jacoco.exec

and I did echoed it and JAVA_OPTS are set enter image description here

I started the app from the cmd java -jar Spring-Boot-Jacoco-Example-0.0.1-SNAPSHOT.jar and it hit the rest end point and shut down the app ctrl+c and looked at the target folder and I don't see any .exec file in the target folder.

I need suggestions or possible solutions inorder to generate .exec file with this method(I don't want to use maven plugin)

Github repo:https://github.com/BhargavModepalli/Spring-Boot-jacoco-Example

Bhargav
  • 79
  • 1
  • 8
  • https://stackoverflow.com/questions/2011311/running-java-with-java-opts-env-variable-has-no-effect solved the issue – Bhargav Jul 24 '19 at 02:34

0 Answers0