I'm trying to get the code coverage with integration test, which is the JUnit 
test run with WLP server. I have to attach the Jacoco agent to the WLP JVM to 
get the right coverage.Unfortunately, the customized Ant task of WLP doesn't 
provide a place to set the JVM options.

<taskdef resource="com/ibm/websphere/wlp/ant/antlib.xml" format="xml">
                        <classpath 
path="${liberty.server.wlp.dir}/dev/tools/ant/wlp-anttasks.jar"/>
                </taskdef>

<server installDir="${liberty.server.wlp.dir}" operation="start" 
serverName="${liberty.server.name}" />

So I have to hijack the server.bat under my WLP directory and change the JVM 
options as below:

set 
JVM_OPTIONS=-javaagent:C:\wa_devops\bssendpoint\lib\build\jacocoagent.jar=destfile=C:\wa_devops\bssendpoint\target\jacoco-integration.exec
 

Then I get the right coverage. But I don't like to do this way. Is there a 
better way to specify the JVM options in the build.xml?

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/5410cd1d-9040-449c-ac4e-5ecfd4c1c0ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to