I feel like I'm so close yet so far. After this I'll be a level 99 JaCoCo 
grandmaster.

What I'm trying to accomplish is runtime instrumentation of war files using 
offline instrumentation without being a Maven guru.

I'm deploying to WebSphere Liberty in Eclipse to perform sanity checks before I 
attempt to run this through Jenkins for our integration tests.

This is the pom file I've hacked together: 
https://gist.github.com/foofactory/6daa3178b7581f74ebe8
When I run mvn clean package I do get output in 
target/generated-classes/jacoco/.../Foo.class
When I start up Liberty, app loads, I click around on the website to trigger 
some code coverage, shut down liberty... no report.exec (no surprise).

I don't expect this to work as is, I know I'm screwing things up but I'm 
experimenting to find what works (trying to configure maven-war plugin with 
jacoco-agent.destfile... stupid but I don't know what else to do).

I see jacoco-agent.destfile bound to maven-surefire-plugin... is there a 
equivalent I can bind jacoco-agent to in the pom so that instrumentation 
starts/stops/produces exec file during runtime instead of integration testing?

>From http://www.eclemma.org/jacoco/trunk/doc/offline.html
> Configuration File: If a file jacoco-agent.properties is supplied on the 
> classpath...

I'm not sure how to accomplish this or if this is the missing piece. Jacoco 
libraries are in my Maven dependencies, added to webapp lib.

All I can do is drop the war file into WebSphere and cross my fingers.

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to