Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Thomas Sundberg
Hi! I am trying to write my own Maven plugin. I want to be able to specify it in a build without specifying any additional parameters. I don't seem to find any example after some googling. In a perfect world, I would like to write my pom like this: build plugins plugin

Re: Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Tamás Cservenák
You cannot have that, you need to bind the goal at least (and goal usually have a preferred phase it will bind to). 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

Re: Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Thomas Sundberg
Hi! On 21 July 2012 10:45, Tamás Cservenák ta...@cservenak.net wrote: You cannot have that, you need to bind the goal at least (and goal usually have a preferred phase it will bind to). Plugin that does not have execution defined but it still executes (as you say you'd want) is usually bound

Re: Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Robert Scholte
I'd start with http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-intro.html And have a good look at http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-plugins-lifecycle.html#writing-plugins-sect-override-default-lifecycle -Robert Op Sat, 21 Jul

Re: Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Wayne Fay
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

Re: Writing my own mojo - how do I specify a default goal?

2012-07-21 Thread Thomas Sundberg
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