>From Maven documentation: >http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html It says:
a build phase can also have zero or more goals bound to it. If a build phase has no goals bound to it, that build phase will not execute. But if it has one or more goals bound to it, it will execute all those goals (Note: In Maven 2.0.5 and above, multiple goals bound to a phase are executed in the same order as they are declared in the POM, however multiple instances of the same plugin are not supported. Multiple instances of the same plugin are grouped to execute together and ordered in Maven 2.0.11 and above). Ronen -----Original Message----- From: subir.sasiku...@wipro.com [mailto:subir.sasiku...@wipro.com] Sent: ה 18 מרץ 2010 14:18 To: users@maven.apache.org Subject: RE: How to perform ordered tasks in Maven2 build Have different executions in different phases to ensure the order. In the same phase you cannot gaurantee any order AFAIK. Subir -----Original Message----- From: Perez Ronen [mailto:ronen.pe...@comverse.com] Sent: Thursday, March 18, 2010 12:42 PM To: Maven Users List Subject: How to perform ordered tasks in Maven2 build Hi, I am trying to migrate a Java application built by Ant to Maven2. among other the build perform the following operations: 1) Running a javadoc doclet to find annotated Java files to be externalize later as web services 2) compile a small part of the code for step 3 3) run Axis java2wsdl on the compiled code from step 2 4) produce java code with wsdl2java on the wsdl files from step 3 5) compile the entire code when trying to "mavenize" the process I can accomplish each task at a time but fail to achieve them all in that order. to demonstrate my pom and not load you with details I'll show the following snippet: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.6.1</version> <executions> <execution> <id>aggregate</id> <phase>generate-sources</phase> <goals> <goal>aggregate</goal> </goals> <configuration>...</configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>compileWSfiles</id> <goals> <goal>compile</goal> </goals> <phase>generate-sources</phase> <configuration> <includes> <!-- include 3 source files --> </includes> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>axistools-maven-plugin</artifactId> <version>1.3</version> <dependencies> <dependency> <groupId>axis</groupId> <artifactId>axis</artifactId> <version>1.3</version> </dependency> </dependencies> <executions> <execution> <id>java2wsdl</id> <phase>generate-sources</phase> <goals> <goal>java2wsdl</goal> </goals> <configuration>...</configuration> </execution> <execution> <id>wsdl2java</id> <phase>generate-sources</phase> <goals> <goal>wsdl2java</goal> </goals> <configuration>...</configuration> </execution> </executions> </plugin> </plugins> I pinned all of the build executions on the generate-sources phase and as far as I know they should run in the order they are defined in the pom. The main problem is that I have no control on the order of things and it is obviously important here as every step output is the next step input. any suggestions? Thanks, Ronen. ________________________________ "This e-mail message may contain confidential, commercial or privileged information that constitutes proprietary information of Comverse Technology or its subsidiaries. If you are not the intended recipient of this message, you are hereby notified that any review, use or distribution of this information is absolutely prohibited and we request that you delete all copies and contact us by e-mailing to: secur...@comverse.com. Thank You." Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org “This e-mail message may contain confidential, commercial or privileged information that constitutes proprietary information of Comverse Technology or its subsidiaries. If you are not the intended recipient of this message, you are hereby notified that any review, use or distribution of this information is absolutely prohibited and we request that you delete all copies and contact us by e-mailing to: secur...@comverse.com. Thank You.” --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org