Thank you for the link. It cleared up a lot for me. The project now works as I want. /Ludwig
-----Original Message----- From: Thomas Fischer [mailto:fisc...@seitenbau.net] Sent: den 10 november 2009 11:40 To: Apache Torque Users List Subject: RE: [torrque-maven-plugin] Colliding parameters for different goals. Oops- sorry. My example was wrong, did not look careful enough. These tags were meant to be <id />tags. The phase should be generate-sources. So it should read: <execution> <id>generate-om</id> <phase>generate-sources</id> <goals> <goal>om</goal> <goal>sql</goal> </goals> </execution> and the same for the following execution definitions. There are more phases than you think. See the list at the bottom of http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.ht ml for the available phases. Thomas > RE: [torrque-maven-plugin] Colliding parameters for different goals. > > Then I was mislead by the maven documentation. > I thought the only valid values for <phase/> were clean, compile, test, > build, install, verify. > > But the phases generate-om and generate-sql are defined in torque? > Are there any documentation on what phases there are in torque? > I can't find it on the plugin page. > /Ludwig > > > -----Original Message----- > From: Thomas Fischer [mailto:fisc...@seitenbau.net] > Sent: den 10 november 2009 11:06 > To: Apache Torque Users List > Subject: RE: [torrque-maven-plugin] Colliding parameters for different > goals. > > > I have encountered a problem running the M2 plugin for torque. The goals > I > > run are basically om, sql and sqlExec. There are a lot of parameters that > > can be specified for these goals so I do it in my projects pom.xml. > However, > > all these three goals have some parameters that have the same name, e.g > the > > outputDir parameter. For om, I want this to point to my source directory, > > for sql I want another directory where the sql-file will be generated. > But > > Maven2 is limited here and it is not possible to map different values for > > the same parameter to different goals. > > This is not true. You need to define more than one execution. > In principle, you have the following options: > > 1) use the same configuration for all goals (this is what you currently do) > <plugin> > <groupId>org.apache.torque</groupId> > <artifactId>torque-maven-plugin</artifactId> > <version>3.3</version> > <configuration> > ... > </configuration> > <executions> > <execution> > <phase>generate-om</phase> > <goals> > <goal>om</goal> > <goal>sql</goal> > </goals> > </execution> > </executions> > </plugin> > 2) define different executions, and define the complete configuration for > each execution > <plugin> > <groupId>org.apache.torque</groupId> > <artifactId>torque-maven-plugin</artifactId> > <version>3.3</version> > <executions> > <execution> > <phase>generate-om</phase> > <goals> > <goal>om</goal> > </goals> > <configuration> > ... > </configuration> > </execution> > <execution> > <phase>generate-sql</phase> > <goals> > <goal>sql</goal> > </goals> > <configuration> > ... > </configuration> > </execution> > </executions> > </plugin> > The following does not work: > 3) Define some parameters for all executions and some for a specific > execution > <plugin> > <groupId>org.apache.torque</groupId> > <artifactId>torque-maven-plugin</artifactId> > <version>3.3</version> > <configuration> > ... > </configuration> > <executions> > <execution> > <phase>generate-om</phase> > <goals> > <goal>om</goal> > </goals> > <configuration> > ... > </configuration> > </execution> > <execution> > <phase>generate-sql</phase> > <goals> > <goal>sql</goal> > </goals> > <configuration> > ... > </configuration> > </execution> > </executions> > </plugin> > > As 1) does not meet your requiremets your only option is 2) > > Thomas > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org > For additional commands, e-mail: torque-user-h...@db.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org > For additional commands, e-mail: torque-user-h...@db.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org For additional commands, e-mail: torque-user-h...@db.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org For additional commands, e-mail: torque-user-h...@db.apache.org