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
>