sorry if this has been already discussed. I just came across this and I'm not sure to understand it fully.
I wonder why the jacoco:prepare-agent maven goal is bound to the very early lifecycle phase "initialize"? Wouldn't be a later phase be more reasonable?
I assume in most cases this does not matter - nevertheless I've a nested multi module maven project here which breaks because the inherited "prepare-agent" needs to be evaluated so early and maven misses to find dependent modules.
One 2nd thing, would it be possible to automatically ignore the "prepare-agent" if tests are skipped?
Thanks for feedback,
Kind Regards, Andreas.
Hello,
you mean skip when maven.test.skip is set?
You may achieve this easily by referencing this property in the default-prepare-agent execution. There you may easily redefine the bound phase as well.
I use jacoco in projects which have no tests run by surefire or failsafe but the invoker plugin, so this could break my use case :-).
Regards
Mirko
--
Sent from my mobile
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/0f162cb6-a604-4e85-b2bb-7d9cbf20a6d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
sure I can switch away from the default phase, but shouldn't the default be the best value for most cases? I'd expect that the agent init could run right before the test case execution? Might be i miss something here?
For the skip - do you run these projects with skipTests set?
Kind Regards,
Andreas.
Am Samstag, 29. Oktober 2016 12:59:52 UTC+2 schrieb Mirko Friedenhagen:
> Hello,
>
> you mean skip when maven.test.skip is set?
>
> You may achieve this easily by referencing this property in the default-prepare-agent execution. There you may easily redefine the bound phase as well.
>
> I use jacoco in projects which have no tests run by surefire or failsafe but the invoker plugin, so this could break my use case :-).
>
> Regards
>
> Mirko
>
> --
>
> Sent from my mobile
>
>
>
> Am 29.10.2016 12:15 schrieb <andreas...@gmail.com>:
> Hello list,
>
>
>
> sorry if this has been already discussed. I just came across this and I'm not sure to understand it fully.
>
>
>
> I wonder why the jacoco:prepare-agent maven goal is bound to the very early lifecycle phase "initialize"? Wouldn't be a later phase be more reasonable?
>
>
>
> I assume in most cases this does not matter - nevertheless I've a nested multi module maven project here which breaks because the inherited "prepare-agent" needs to be evaluated so early and maven misses to find dependent modules.
>
>
>
> One 2nd thing, would it be possible to automatically ignore the "prepare-agent" if tests are skipped?
>
>
>
> Thanks for feedback,
>
>
>
> Kind Regards, Andreas.
>
>
>
>
>
> --
>
> 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.
skipTests and maven.skip.test have different semantics, the first one will only skip execution of surefire and failsafe while with the latter even the compilation of test sources will be skipped. So if you want to run your ITs only you would need skipTests=true and skipITs=false.
You could set two properties in your project:
<skipTests>false</skipTests>
<jacoco.skip>${skipTests}</jacoco.skip>
I do not run the projects with skipTests. I do not know why prepare-agent comes that early but it should definitely be latest in phase testCompile. Maybe Marc has a better explanation why he chose to use initialize.
Regards
Mirko
--
Sent from my mobile
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/c2538d47-d56d-4531-9cc7-3aefca44d614%40googlegroups.com.