Re: Decorating Mojos

2014-09-01 Thread William Ferguson
Glad you chipped in Manfred :-) I was mainly thinking about this for the the android-maven-plugin as it has a huge number of Mojos, many of which I suspect are hardly ever used. getting some quantification on usage would allow us to work out which Mojos could be dropped and which might be better t

Re: Decorating Mojos

2014-09-01 Thread Manfred Moser
If you want this to be resulting in some sort of useful analysis results I would think it should be fairly useful to hook it up as an option for the plugin and use e.g. Google analytics with some fake urls for each mojo. Only problem is that people might object to you doing that.. manfred Jas

Re: Decorating Mojos

2014-09-01 Thread Jason van Zyl
Just to wrap this discussion up. The spies can be extended for additional events in the future and currently can handle a few more event types, but you must alter the distribution as they are not injected correctly but that can likely be fixed and was an oversight. Spies are also meant for distr

Re: Decorating Mojos

2014-08-31 Thread William Ferguson
Thanks Guys, Jason, I think the maven-timeline solution will be perfect. William On Sun, Aug 31, 2014 at 10:47 PM, Jason van Zyl wrote: > Like I said it was a bit of a mess. There is also the technique used in > the maven-timeline-plugin where you can use an execution listener: > > > https://

Re: Decorating Mojos

2014-08-31 Thread Jason van Zyl
Like I said it was a bit of a mess. There is also the technique used in the maven-timeline-plugin where you can use an execution listener: https://github.com/dgageot/maven-timeline/blob/master/src/main/java/net/gageot/maven/buildevents/BuildEventListener.java This can be loaded from the POM. On

Re: Decorating Mojos

2014-08-31 Thread Jason van Zyl
William, If you just want to know what Mojos are being used then there are a couple implementations for profiling[1][2] but they use EventSpies which means they have to be installed in the distribution being used in order to be activated. We had a brief discussion a few months ago about making

Re: Decorating Mojos

2014-08-31 Thread Robert Scholte
Hi William, I would probably start with aspects. These are post-processors, so you need to run them as part of your build lifecycle. See http://mojo.codehaus.org/aspectj-maven-plugin/ how to use aspectj. I think we can think of a runtime solution as well, but that would be much more complica

Decorating Mojos

2014-08-30 Thread William Ferguson
If I wanted to decorate the calls to each of the Mojos in a plugin what would be the best way of achieving that? I'm considering a use case to use analytics to capture plugin usage so we have a better understanding of which Mojos are of most value. And perhaps to capture details on Mojo failures.