Hi, This is taken from one of my poms :
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>Stop Container</id> <phase>package</phase> <configuration> <executable>stopService.bat</executable> <workingDirectory>${edev.utils}</workingDirectory> <arguments> <argument>${container.service.name}</argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> <execution> <id>Start Container</id> <phase>install</phase> <configuration> <executable>startService.bat</executable> <workingDirectory>${edev.utils}</workingDirectory> <arguments> <argument>${container.service.name}</argument> <argument>${container.deploy.pause}</argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> </executions> </plugin> This snipet ties the executions to a build phase. However I am yet to find a way of executing when not tied to a phase. If anyone can help here...... Cheers Jon "iceman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Thanks for the tip. I still don't seem to get it, based on what you are > saying my config should change to: > >> ... >> <plugin> >> <groupId>org.codehaus.mojo</groupId> >> <artifactId>exec-maven-plugin</artifactId> >> <executions> >> <execution> >> <id>client</id> >> <goals> >> <goal>exec</goal> >> </goals> >> <configuration> >> <executable>foo</executable> >> <arguments> >> <argument>-classpath</argument> >> <classpath/> >> <argument>A B C D</argument> >> </arguments> >> </configuration> >> </execution> > ... [ more execution definitions here] >> </executions> >> </plugin> > > However maven complains with the following error: > > --------------------------------------------- > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] One or more required plugin parameters are invalid/missing for > 'exec:exec > ' > > [0] inside the definition for plugin: 'exec-maven-plugin'specify the > following: > > <configuration> > ... > <executable>VALUE</executable> > </configuration> > > -OR- > > on the command line, specify: '-Dexec.executable=VALUE' > --------------------------------- > > Assuming I were to get the config right, I am still not understanding how > I > would distinguish between one execution or another from the command line. > My goal is that I want to use Maven to launch execution A, or execution > B - > not both. > > thanks! > > > Jon SlinnHawkins wrote: >> >> Hi, >> >> Put the <configuration> within an <execution> for each executable you >> require. >> >> Cheers >> >> Jon >> >> "iceman" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> >>> I've been able to successfully define the configuration for a single >>> execution, but I would like to define more than one. >>> >>> IOTW, I have the following: >>> >>> ... >>> <plugin> >>> <groupId>org.codehaus.mojo</groupId> >>> <artifactId>exec-maven-plugin</artifactId> >>> <executions> >>> <execution> >>> <id>client</id> >>> <goals> >>> <goal>exec</goal> >>> </goals> >>> </execution> >>> </executions> >>> <configuration> >>> <executable>foo</executable> >>> <arguments> >>> <argument>-classpath</argument> >>> <classpath/> >>> <argument>A B C D</argument> >>> </arguments> >>> </configuration> >>> <!-- This doesn't work - you'll have to pass everything on the >>> cmdline! >>> <configuration> >>> <executable>bar</executable> >>> <arguments> >>> <argument>X Y Z</argument> >>> </arguments> >>> </configuration> >>> --> >>> </plugin> >>> >>> As you can see, I can define how to run foo, but not bar. I would like >>> to >>> do both, since it will be common for users of the software to run more >>> than >>> one application. >>> -- >>> View this message in context: >>> http://www.nabble.com/exec-plugin---how-to-define-more-than-one--tf2149338.html#a5935357 >>> Sent from the Maven - Users forum at Nabble.com. >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/exec-plugin---how-to-define-more-than-one--tf2149338.html#a5947937 > Sent from the Maven - Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]