I can confirm this: If you specify one phase for two different actions, you do NOT have ANY control over when they will execute.
If you want to manipulate the order of operations, set the phase values to successive entries from the lifecycle. http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html Dana Lacoste -----Original Message----- From: Nick Stolwijk [mailto:[email protected]] Sent: Tuesday, November 10, 2009 9:59 AM To: Maven Users List Subject: Re: How can I execute plugin X, then plugin Y, then plugin X again ? I don't think this is a bug, if you execute mvn help:effective-pom you will see the two plugin configurations merged. I think your best bet is to set the second execution to a phase later in the chain. Often, this also means you are trying to do to much in one module. Hth, Nick Stolwijk ~Java Developer~ IPROFS BV. Claus Sluterweg 125 2012 WS Haarlem http://www.iprofs.nl On Tue, Nov 10, 2009 at 6:51 PM, Paul Benedict <[email protected]> wrote: > This is probably a bug since the order of plugins should be respected. > > Have you checked the ticket list of 2.2.2 or 3.0-alpha-3 to see if it > is already fixed? > > And are you running 2.2.1? > > Paul > > On Tue, Nov 10, 2009 at 11:48 AM, boraldo <[email protected]> wrote: >> >> Suppose I have to execute some actions after some phase. >> These actions are made plugins X and Y. >> 1st action - executed by plugin X >> 2nd action - executed by plugin Y >> 3rd action - executed by plugin X >> >> I wrote the following pom: >> >> <build> >> <plugins> >> <plugin> >> <artifactId>plugin-x</artifactId> >> <executions> >> <execution> >> <id>step-1-x</id> >> <phase>initialize</phase> >> <goals> >> <goal>goal-x-1</goal> >> </goals> >> </execution> >> </executions> >> </plugin> >> <plugin> >> <artifactId>plugin-y</artifactId> >> <executions> >> <execution> >> <id>step-2-y</id> >> <phase>initialize</phase> >> <goals> >> <goal>goal-y-1</goal> >> </goals> >> </execution> >> </executions> >> </plugin> >> <plugin> >> <artifactId>plugin-x</artifactId> >> <executions> >> <execution> >> <id>step-3-x</id> >> <phase>initialize</phase> >> <goals> >> <goal>goal-x-2</goal> >> </goals> >> </execution> >> </executions> >> </plugin> >> </plugins> >> </build> >> >> I executed: >> mvn initialize >> >> But the sequence of executions was wrong: >> 1. step-1-x >> 2. step-3-x >> 3. step-2-y >> >> This means that each plugin executes all its executions, then the next >> plugin starts to work. >> Can I corrupt such scenario ? >> -- >> View this message in context: >> http://old.nabble.com/How-can-I-execute-plugin-X%2C-then-plugin-Y%2C-then-plugin-X-again---tp26287350p26287350.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
