Hi, I am in the process of moving a project from m1 to m2, and I have encountered a problem with the ordering of plugin executions within a single lifecycle phase. I use two plugins that contribute during the generate-sources phase; a homegrown plugin for generating sources from UML, and xdoclet. The sources generated from UML are supposed to be passed to xdoclet in order to generate various EJB value objects etc.
In m1 I could just order the plugins using preGoal in maven.xml, but in m2 I haven't been able to find a solution. According to the "Introduction to the build lifecycle" document at http://maven.apache.org/guides/introduction/introduction-to-the-lifecycl e.html, "If more than one goal is bound to a particular phase, the order used is that those from the packaging are executed first, followed by those configured in the POM. Note that you can use the executions element to gain more control over the order of particular goals." However, this does not seem to work, and it is also not clear how I can gain more control over the order using the executions element, unless this only refers to multiple executions of the same plugin within a lifecycle phase? I have searched through the maven website, faq and mailing lists without any luck. However, it seems that others have encountered the same issue, e.g. http://www.nabble.com/%7Bm2-plugin-execution-order-t749791.html and http://www.nabble.com/Execution-order-of-plugins-t1519638.html. Is there any way to achieve what I'm looking for in m2? Below is an excerpt from my pom.xml (plugin configuration omitted for brevity). This pom also inherits from a parent pom which includes a plugins section to configure the maven-compiler-plugin java source and target versions. <build> <plugins> <plugin> <groupId>sintef</groupId> <artifactId>maven-umt-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>generate</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>xdoclet-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>xdoclet</goal> </goals> </execution> </executions> </plugin> </plugins> </build> Thanks in advance, -- Fredrik Vraalsen Research Scientist SINTEF Information and Communication Technology Phone: (+47) 22 06 73 45 (direct) / (+47) 98 46 22 55 (mobile) Fax: (+47) 22 06 73 50 E-mail: [EMAIL PROTECTED] Web: http://www.sintef.no/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
