Hi François,

Happy New Year! 

Can you check in generated META-INF/maven/plugin.xml descriptor that your 
annotation in source was well detected?
Because it looks like a typo somewhere in your plugin: if you can share the 
code (eventually privately), perhaps new eyes can find it.

Regards,

Hervé

Le vendredi 5 janvier 2018, 14:36:07 CET Francois MAROT a écrit :
> [Sorry, re-posting with correct formatting]
> 
> Hi all & happy new year !
> I have a question regarding plugin development.
> 
> I have made a custom plugin and would like to make it's Mojo executed once
> *and only once* in my whole reactor build. If I include it in my parent pom
> (not in pluginManagement), then by default it is executed once at the root
> and once in child-modules.
> 
> Solutions I found out:
> 
> - <inherited>false</inherited> used in plugin declaration in pom => it sorta
> do what I want
> BUT my plugin is not executed once if I invoke the maven build directly
> inside a child-module.
> 
> - aggregator = true in the @Mojo annotation => I thought it was THE solution
> but I can't
> seem to understand what it does: despite declaring my mojo an aggregator, it
> is executed in all children.
> 
> -
> http://blog.sonatype.com/2009/05/how-to-make-a-plugin-run-once-during-a-buil
> d/ => the solution given there does not really satisfies me because it means
> Maven WILL call my execute() method more than once, simply my plugin will
> bypass it except at the execution root. We can do better than that can't we
> ?!
> 
> I really can't understand why the aggregator parameter does not work as I
> expected it to.
> Any idea ?
> 
> François
> 
> 
> 
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to