Given that Jacoco doesn\'t play nicely with PowerMockito when instrumenting \"on the fly\", I\'ve been trying to configure offline instrumentation in the hope this will give
I made it work using the javaagent of PowerMock. see here: https://github.com/powermock/powermock/wiki/PowerMockAgent
Remove the @RunWith annotations, put the PowerMockRule as described in the link above. Make it public.
Put the following line in the maven-surefire-plugin configuration:
-javaagent:${org.powermock:powermock-module-javaagent:jar}
(used the technique described here : Can I use the path to a Maven dependency as a property?)
4.0.0
com.stackoverflow
q2359872
2.0-SNAPSHOT
q2359872
${org.jmockit:jmockit:jar}
org.jmockit
jmockit
1.11
generate-sources
org.apache.maven.plugins
maven-dependency-plugin
2.3
properties
org.codehaus.mojo
exec-maven-plugin
1.2
exec
generate-sources
echo
path to jar=
${org.jmockit:jmockit:jar}
my.lib=
${my.lib}