You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Farhan Sarwar <fs...@vaudit.com> on 2007/08/10 02:20:09 UTC
How to define as to which phase the goal is to be executed
Another quick question, Where to define/configure as to which phase the
Mojo/goal is to be executed, so far with what I have read it seems that it's
the Mojo class file which has this annotation for @phase (at class level) to
tell MAVEN about the phase the goal is to be executed, just wanted to be
sure if that's the only way.
Farhan.
Re: How to define as to which phase the goal is to be executed
Posted by Insitu <ab...@oqube.com>.
"Farhan Sarwar" <fs...@vaudit.com> writes:
> Another quick question, Where to define/configure as to which phase the
> Mojo/goal is to be executed, so far with what I have read it seems that it's
> the Mojo class file which has this annotation for @phase (at class level) to
> tell MAVEN about the phase the goal is to be executed, just wanted to be
> sure if that's the only way.
>
>
>
> Farhan.
>
No, that's not the only way, that's the default way to define when a
mojo is run. You can also bind a mojo in a different phase, or even
multiple phases, using the execution configuration in your POM (Note:
the one that use the mojo, not the one that defines the mojo):
<plugins>
<plugin>
<artifactId>myartifact-plugin<
<groupId>...
<executions>
<execution>
<id>exe1</id>
<goals>
<goal>mygoal</goal>
</goals>
<configuration>
<!-- config for this execution goes here -->
</configuration>
</execution>
</executions>
HTH
--
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org