Set JAVA_OPTS within the maven build step to inject JaCoCo agent

305 Views Asked by At

I have a project that has has integration tests executed via maven-failsafe-plugin against locally deployed tomcat from SAP BTP SDK (https://tools.hana.ondemand.com). It is deployed and started via commands of the maven plugin.

The problem is that I cannot inject the JaCoCo agent there. Apparently, I can do it via JAVA_OPTS (I've seen the jacoco exec file appear if I set JAVA_OPTS in terminal), but cannot figure out how to set it from within the maven build (at pre-integration-test phase after JaCoCo agent is configured).

How can I do that?

0

There are 0 best solutions below