Such extension are executing after projects read.
So if it's a model validation issue (as it looks to be your case) it's too late.
What you can try is to implement your own EventSpy
(http://maven.apache.org/ref/3.0.4/apidocs/org/apache/maven/eventspy/EventSpy.html
)
The first onEvent call is with MavenExecutionRequest before everything start.

2013/1/23 Jesse Farinacci <[email protected]>:
> Greetings
>
> I'm seeing some odd behavior with a custom Apache Maven extension
> intended to force on error message mode (-e). The extension can be
> found here https://gist.github.com/63e65486e60124a3e8f7
>
> The extension loads fine, and I see the log message found in the
> extension, but it doesn't actually enable error message mode! I verify
> error message mode is not enabled via the extension by causing an
> error in a project, e.g. dependency on junit:junit:666, and observing
> the difference with and without -e passed to mvn.
>
> Would someone please tell me the magic incantation to programmatically
> get error message mode enabled? It appears that setting
> MavenExecutionRequest.setShowErrors(true) should do the trick, but
> perhaps this is read once and never again, which occurs before the
> extension gets loaded?
>
> Any help is appreciated,
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to