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 write your own packaging (I doubt this is
what you need), you are left to declare plugin _with_ executions.

Thanks,
~t~

On Sat, Jul 21, 2012 at 10:13 AM, Thomas Sundberg <[email protected]> wrote:

> 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>
>                 <groupId>se.somath</groupId>
>                 <artifactId>publisher-plugin</artifactId>
>                 <version>1.0-SNAPSHOT</version>
>             </plugin>
>         </plugins>
>     </build>
>
> That is, just specify that this plugin should be used.
>
> At the moment I have to specify it like this:
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>se.somath</groupId>
>                 <artifactId>publisher-plugin</artifactId>
>                 <version>1.0-SNAPSHOT</version>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>process</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>     </build>
>
> Currently I have just one goal and it doesn't take any parameters.
>
> This question might be better to send to the developers list, but I
> don't follow that list and I assume that there are some mojo
> developers following this list that might be able to assist me.
>
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to