How to run coverage using -XX:-UseSplitVerifier?

3,942 views
Skip to first unread message

headcr...@googlemail.com

unread,
Feb 14, 2013, 3:08:10 AM2/14/13
to jac...@googlegroups.com
One of the projects I want to cover with the EclEmma plugin (Eclipse Juno) is written in Java 7 and uses PowerMock. Due to some kind of incompatibility with Java 7, PowerMock will only work if -XX:-UseSplitVerifier is used. Using Maven, this was easy to do for CLI invocations of JaCoCo (mvn verify)...

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<argLine>-XX:-UseSplitVerifier</argLine>
</configuration>
</plugin>

...but now I want to also get the EclEmma plugin working. So I have put "-XX:-UseSplitVerifier" into the "VM arguments" of the coverage configuration. But it seems it is getting ignored!

Can anybody tell me how to convince EclEmma to really run JaCoCo with -XX:-UseSplitVerifiers instead of simply ignoring the "VM arguments"?

Thanks!
-Markus

Marc Hoffmann

unread,
Feb 14, 2013, 3:19:58 AM2/14/13
to jac...@googlegroups.com
I just double checked: VM arguments are properly passed. Try entering
an invalid option, you will see that the JVM fails to launch.

Note that JaCoCo requires proper stackmap frames in any case. If a
Powermock produces invalid class files JaCoCo will fail with these
files.

Best regards,
-marc

Markus Karg

unread,
Feb 15, 2013, 12:09:58 PM2/15/13
to jac...@googlegroups.com
So you think it is a bug in PowerMock? I do not understand why it works when
running it using "mvn verify" then!
> --
> 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 jacoco+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>


Marc R. Hoffmann

unread,
Feb 15, 2013, 2:38:29 PM2/15/13
to jac...@googlegroups.com
I haven't personally verified this, but it looks like a known issue:

http://code.google.com/p/powermock/issues/detail?id=355

Markus Karg

unread,
Feb 16, 2013, 3:33:51 AM2/16/13
to jac...@googlegroups.com
I know about that PowerMock issue very well, and if you followed this thread
carefully you will notice that what I am actually complaining about is the
fact that the solution proposed in that PowerMock thread (see title of this
thread) is really well in Maven+PowerMock+JaCoCo and Eclipse+PowerMock, but
not in Eclipse+PowerMock+JaCoCo. ;-)

Marc R. Hoffmann

unread,
Feb 17, 2013, 12:58:12 PM2/17/13
to jac...@googlegroups.com
What you can do to investigate this is to compare the effective command
line used in both cases:

- In Eclipse you see the command line in the property dialog of the
process in the debug view.
- In Maven the command line should be dumped if started in debug mode.

Note that if multiple agents configured in the command line the ordering
is important.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages