Hello Kaare, thanks for your reply. unfortunately it does not work. i am getting the following error. for some reason the plugin seems to expect, the configuration tag outside the execution tag, which means that there can only be one configuration tag. any more ideas.
by the way. how to i properly start a specific configuration. so far i have been using "mvn exec:exec". how'd i specify the "id" of the configuration to execute. thanks in advance, Andy [INFO] ------------------------------------------------------------------------- --- [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' [INFO] ------------------------------------------------------------------------- --- [INFO] For more information, run Maven with the -e switch > Hi.. > you'r almost there ;) > So what you could do is : > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>exec-maven-plugin</artifactId> > <executions> > <execution> > <id>testserver</id> > <phase>package</phase> > <goals> > <goal>exec</goal> > </goals> > <configuration> > <executable>java</executable> > <arguments> > <argument>-classpath</argument> > <!-- automatically creates the classpath using all > project dependencies --> > <classpath /> > <argument> > de.jos.bla.TestServer > </argument> > </arguments> > </configuration> > </execution> > <execution> > <id>client</id> > <phase>package</phase> > <goals> > <goal>exec</goal> > </goals> > <configuration> > <executable>java</executable> > <arguments> > <argument>-classpath</argument> > <!-- automatically creates the classpath using all > project dependencies --> > <classpath /> > <argument> > de.jos.bla.Client (or what ever the main class is) > </argument> > </arguments> > </configuration> > </execution> > </executions> > </plugin> > > > Best regards > /Kaare > > > On 12/03/06, Andreas Wüst <[EMAIL PROTECTED]> wrote: > >> Hello all, >> >> i have a project that has two main classes (testserver / client). >> however, i have no idea how to >> configure and start the second main. one is easy (testserver). but how >> do i have to configure the second >> main class, so i can start the client from the command line. my pom so >> far looks like : >> >> <plugin> >> <groupId>org.codehaus.mojo</groupId> >> <artifactId>exec-maven-plugin</artifactId> >> <executions> >> <execution> >> <id>testserver</id> >> <phase>package</phase> >> <goals> >> <goal>exec</goal> >> </goals> >> </execution> >> </executions> >> <configuration> >> <executable>java</executable> >> <arguments> >> <argument>-classpath</argument> >> <!-- automatically creates the classpath using >> all project dependencies --> >> <classpath /> >> <argument> >> de.jos.bla.TestServer >> </argument> >> </arguments> >> </configuration> >> </plugin> >> >> >> thanks in advance, >> Andy >> >> > > > >