I have a Maven project and it has 2 mains (MyTestApp_A, and MyTestApp_B) inside one of the packages from the src folder.
I can run these \"main\" classes in Eclipse
Try using executions for each main class you want to execute:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>MyTestApp_A</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>servers.MyTestApp_A</mainClass>
<includePluginDependencies>false</includePluginDependencies>
</configuration>
</execution>
<execution>
<id>MyTestApp_B</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>servers.MyTestApp_B</mainClass>
<includePluginDependencies>false</includePluginDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>