when you declare the plugin in your plugins group you can either associate your
plugin with the desired lifecycle phase ..
in the first case the plugin goal of goal1 is tied to the validate phase
when execution is not tied to a specific phase goal2 is executed e.g.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<id>first</id>
<goals>
<goal>goal1</goal>
</goals>
<phase>validate</phase>
</execution>
<execution>
<id>second</id>
<goals>
<goal>goal2</goal>
</goals>
</execution>
</executions>
http://www.avajava.com/tutorials/lessons/how-do-i-specify-the-phase-of-a-lifecycle-in-a-mojo.html
HTH
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.Ce message est confidentiel et peut être
privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec
bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non
autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant
donné que les email peuvent facilement être sujets à la manipulation, nous ne
pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Fri, 10 Sep 2010 11:07:23 +0000
> Subject: Custom execution steps when no lifecycle given
> From: [email protected]
> To: [email protected]
>
> Hello All,
>
> I am a relatively new user to maven so please bear with me. I am using the
> maven-release-plugin and as part of the release:prepare goal i want to run
> some custom ant code. Can some one please help me how to do this? I found
> the maven-ant plugin but it requires a <phase> to add custom ant execution
> steps, the release plugin has no such phase ?
>
> Thanks
> Anishek