Hi Andreas,

Note that order of goals in same phase is dictated by order of declaration 
of plugins, so "test" phase is not the best default - most likely will lead 
to a lot of questions.
"prepare-agent" sets property, so "initialize" phase was chosen as a first 
(prior to "test") best match according to description of phases on page 
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

So far (5 years since inception of jacoco-maven-plugin) "initialize" phase 
was a good default choice. And so seems better to not change this now - it 
might be quite notable change for users that were able to rely on this 
choice for many years.

And to me seems that this is a first time that we hear that "initialize" is 
not a good default. Might be interesting to see exact example, when it 
causes trouble.

Best regards,
Evgeny

On Saturday, November 12, 2016 at 10:30:29 AM UTC+1, 
[email protected] wrote:
>
> Hello Mirko,
>
> 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  <[email protected]>:
> > 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 [email protected].
> > 
> > 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.
>
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/df68bfb3-48fc-4a8b-b3a3-f27d94c07a0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to