Why would you declare the plugin twice in the same pom? Just put multiple executions in the same definition.
-----Original Message----- From: Bernhard David [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 16, 2008 10:22 AM To: Maven Users List Subject: RE: Order of executing plugins changed in 2.0.9 ? Hello, after some long hours with the debugger, I discovered the following. If I define a plugin twice like this: <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <executions> <execution> <id>start-container</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <executions> <execution> <id>deploy</id> <phase>pre-integration-test</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin> Maven executes the plugins backwards. (Deploy first) However, this can be fixed with <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <executions> <execution> <id>start-container-and-deploy</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> <goal>deploy</goal> </goals> </execution> </executions> </plugin> which solves my problem. The backwards issue does seem odd to me - I've posted to the dev list too, asking about it. The point is that the merging is done with the new definition as "parent" and the old one as "child", resulting in the parent coming first. Apart from this, you're right about the ordering. Yours, David Bernhard > -----Original Message----- > From: Max Bowsher [mailto:[EMAIL PROTECTED] > Sent: 16 April 2008 16:10 > To: Maven Users List > Subject: Re: Order of executing plugins changed in 2.0.9 ? > > > Bernhard David wrote: > >> in maven 2.0.8 I can put the following in a pom to execute first > >> cargo:start then cargo:deploy in the pre-integration-test phase. In > >> 2.0.9, maven executes deploy first, which breaks the build. > > VUB Stefan Seidel wrote: > > AFAIK, the execution of plugins in the same phase is not > consistent. > > I was under the impression that there was ordering of lifecycle bound > executions first, then executions from each pom in a parent-child > hierarchy in that order, and within each pom, in declaration order. > > Am I just imagining things? > > Max. > > > --------------------------------------------------------------------- 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]
