Thank you very much. -----Original Message----- From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] Sent: den 9 november 2009 11:45 To: Maven Users List Subject: Re: Specific goal gonfiguration in maven does not work
2009/11/9 Ludwig Magnusson <lud...@itcatapult.com>: > Hi! > > I am using the torque plugin for maven and I am trying to set goal-specific > configurations but when I run the goal. Maven can't find the parameters. > > > > When I do a "global" configuration, everything works. Like this: > > > > <plugin> > > <groupId>org.apache.torque</groupId> > > <artifactId>torque-maven-plugin</artifactId> > > <version>4.0-alpha1-SNAPSHOT</version> > > <configuration> > > //my configuration > > </configuration> > > </plugin> > The above applies to all executions > > > But when I do a goal specific configuration the parameters aren't found. > Like this: > > > > <plugin> > > <groupId>org.apache.torque</groupId> > > <artifactId>torque-maven-plugin</artifactId> > > <version>4.0-alpha1-SNAPSHOT</version> > > <executions> > > <execution> > > <id>my-id</id> > > <goals> > > <goal>om</goal> > > </goals> > > <configuration> > > //my configuration > > </configuration> > > </execution> > > </executions> > > </plugin> > > the above binds an execution of om to the lifecycle at the phase specified in the @phase annotation on your mojo (which could be overridden by an <phase>___</phase> in your execution. The configuration only applies to this execution. If you have not got either a @phase on your mojo or a <phase> in your execution, then maven will not complain and just never execute this goal as part of any lifecycle > > In both cases I run mvn torque:om from the command line. > that is execution directly from the CLI, not as part of the lifecycle, so will not be picked up in maven 2.2.1, there is an execution id assigned to cli invocation of IIRC default-cli, and this would achieve what you are after > I'm not really sure about the id-parameter. I have read the documentation > but I'm not sure I get it. > > /Ludwig > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org