laeubi commented on PR #740:
URL: https://github.com/apache/maven/pull/740#issuecomment-1126640803
   @cstamas I don't think the javadoc is that strict as you try to depict here. 
It only say that EventSpy is a core extension but why should core extension 
interfaces not be accessible? Beside that, I even don't see a reason why not an 
plugin-extension should be able to receive events, but that's another topic ..
   
   About your links, if you take a closer look at this PR you will see I have 
linked exactly your second ref here, sorry if it was not clear enough (I 
updated my comment).
   
   > Event spy emits Maven Core events (about processing the build, among them 
mojos as well) to some external listener extension.
   
   Not sure if we are talking about the same thing, actually EventSpy is the 
"some external listener extension" that *receives* events, the events are 
*emitted* by `EventSpyDispatcher` what resides in an internal package and I 
don't propose here to export *that* package...
   
   > If you want to "benchmark" Mojo internals, why do you need event spy at 
all?
   
   I want to look up **one** specific event spy to inject **additional** events 
to that listener so they appear in the report of that plugin as if they where 
emitted by maven, maybe I even later on want to emit **custom** ones, the 
reason for this is simple, I don't want another implementation or report but 
reuse/extend an existing one.
   
   > if you need to interact with your specific event spy, you could inject the 
implementation or another interface instead of the `EventSpy` interface which 
is meant to be actually used by maven and does not provide any information. Or 
do I miss something ?
   
   As the implementation is not controlled by me, the idea was just to have as 
less dependencies to it as possible, and for that I can e.g. send a 
`RepositoryEvent` to the `EventSpy#onEvent`, so just assume some time later on 
the implementation was renamed/moved I need not adjust my code (the implementer 
even might consider its implementation as internal, what is perfectly valid). I 
think that's the nice thing about the container look-up that I don't need to 
bind to the specific implementation but could choose by the role-hint...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to