Hi,
I'm not able to have code coverage and deploy un-instrumented jars on same maven build
By what says here:
https://confluence.atlassian.com/display/CLOVERKB/Maven+is+deploying+instrumented+jars
I should able to achieve that by using clover2:intstrument and / or clover2:instrument-test but it does not provides much more details.
If I execute something like this:
mvn -e -U -Pcoverage clean compile clover2:instrument-test test clover2:clover package
maven only produces instarumented jars in a specific location but no un-instrumented jars are produced (so packaging fails)
How can I have instrumented classes for clover to provide coverage but package un-instrumented classes in the default location ?
instrument-test
goal forks the lifecycle and runs only to test
phase because of which it's not present during package
phase, in order to generate jar with cloverized source code you shall use instrument
goalcompile
goal before instrument
may cause calling this phase multiple times which is not necessary, because instrument
forks the build lifecycle.If that won't help, here's couple of additional questions to help determining what's going wrong in your env:
coverage
profile ? Could you pass a snippet here ? Instrument
mojo forks a lifecycle so it should not affect your normal build.
Note:
If you want to use newest Clover (currently 4.1.1) you have to redefine all references to clover-maven-plugin
and call Clover goals by clover
name, e.g clover:instrument
, more info accessible here
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.