On 21 July 2012 20:51, Wayne Fay <wayne...@gmail.com> wrote: >>> Plugin that does not have execution defined but it still executes (as you >>> say you'd want) is usually bound to lifecycle of the packaging in it's >>> lifecycle mapping. So, unless you write your own packaging (I doubt this is >>> what you need), you are left to declare plugin _with_ executions. >> >> But it is either a well guarded secret how to package a plugin so it >> has knowledge about when it should be executed or impossible. > > There is no great conspiracy at work here. You simply fail to > understand what is meant by the term "packaging." Tamás is not saying > you need to package your plugin a particular way for this to work. He > is literally talking about Maven's concept of a package (jar, war, > ear, pom, etc) and how that determines the lifecycle which will be > used and thus which plugins are bound to the build.
Yes, that was the part I failed to understand. > > Read more here: > http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Packaging > > If you really want to do this, read Robert's links. It is nontrivial > stuff but can certainly be done if this is truly what you require. I have gotten it to work now and while preparing dinner I suddenly understood what Tamas meant. The pointers Robert gave me was good and got me in the right direction. > Most people find this to be way more than they need and resort to > providing a couple extra lines of configuration in their plugin > declarations instead. You are probably right. Adding the extra configuration makes it easier to execute your own Mojo, but for some reasons I didn't want them there. I ended up with an additional <extensions>true</extensions> instead. I guess that's something I have to live with. Thanks for your help! Thomas -- Thomas Sundberg M. Sc. in Computer Science Mobile: +46 70 767 33 15 Blog: http://thomassundberg.wordpress.com/ Twitter: @thomassundberg Better software through faster feedback --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org