But when you define an execution, you define what stage of the lifecycle it 
would be edited.

For example, I might use antrun to get something in generate-resources, and 
then compile, and
then use another antrun to package.

there's no issue doing this in one declaration of the plugin.

Contrarily, there IS an issue with declaring plugins multiply: the dependencies 
required for
the plugin (if any) might differ in the two declarations and get mixed up 
(maven only instantiates
a plugin once per run: it will "lose" the dependency information from the 
second call if the
first one has a different dependency list.)

I know this first hand: I was using jakarta-regexp (ant task) with antrun to do 
something in
an antrun declared in a profile, and using antrun separately in the pom.  the 
dual declarations
caused a huge headache trying to figure out why it didn't work!

The moral of the story is:

The maven way is "One plugin declaration, multiple executions"

Dana Lacoste

-----Original Message-----
From: Thierry Lach [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 16, 2008 2:11 PM
To: Maven Users List
Subject: Re: Order of executing plugins changed in 2.0.9 ?

One reason might be to run something else between the two?

On Wed, Apr 16, 2008 at 4:43 PM, Brian E. Fox <[EMAIL PROTECTED]>
wrote:

> Why would you declare the plugin twice in the same pom? Just put
> multiple executions in the same definition.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to