Jacoco with IBM Websphere Liberty Profile

199 views
Skip to first unread message

qunf...@gmail.com

unread,
Feb 17, 2015, 2:55:06 AM2/17/15
to jac...@googlegroups.com
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?

Marc Hoffmann

unread,
Feb 17, 2015, 5:16:09 AM2/17/15
to jac...@googlegroups.com
> Is there a better way to specify the JVM options in the build.xml?

Seems to be a WLP specific question. Maybe you get an answer from IBM's
support channels how to set JVM options?

Regards,
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages