Hi, htfv Thanks for your reply. I got a mail like your idea privately and I implemented the delegation listener using Proxy.
I released the plugin to my maven repository. https://github.com/kompiro/notification-maven-plugin Regards, Hiroki On Mon, Aug 20, 2012 at 8:35 PM, Aliaksei Lahachou <[email protected]> wrote: > Hi, > > You may replace execution listener with your listener and delegate events > to the previous listener. You may inherit your listener from something like > this: [1]. > > BTW, I've never seen that Maven sets some default execution listener, it > was always null in my tests. Can someone confirm if it is used internally > by the Maven? > > > [1] > https://github.com/htfv/build-configurator/blob/master/build-configurator-core/src/main/java/com/github/htfv/maven/plugins/buildconfigurator/core/DelegatingExecutionListener.java > > > Regards, > htfv (Aliaksei Lahachou) > > > On Mon, Aug 13, 2012 at 12:48 PM, Hiroki Kondo <[email protected]> wrote: > >> Hi, >> >> I develop a simple plugin to notify build results to desktop like growl. >> https://github.com/kompiro/notification-maven-plugin >> >> Now, I think there are no good way to listen build result event. >> I tested two way to listen the event. >> >> a. ExecutionListener from MavenSession#getRequest() >> >> This way is implemented below. >> >> https://github.com/kompiro/notification-maven-plugin/blob/master/src/main/java/org/kompiro/nortification/buildresult/NotificationMojo.java >> >> This way is running well to notify, but there is a problem. It >> replaced default maven event execution listener. So, if user add this >> plugin, there are no maven execution log. I thought my implementation >> extends the default event execution listener "ExecutionEventLogger", >> But I can't because The constructor of ExecutionEventLogger needs >> plexus's logger. I can't get the logger object. >> >> b. use EventSpy >> >> This is not public interface and user must add the plugin to maven.ext >> classpath.It is not good for user. >> >> How can I listen the event correctly? >> >> (Sorry for multi posting: >> >> http://stackoverflow.com/questions/11923356/how-can-i-make-a-maven-plugin-to-notify-build-results/11930324#11930324 >> ) >> >> -- >> Hiroki Kondo >> [email protected] >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> -- Hiroki Kondo [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
