I need to execute several java classes during maven build phase, but plugin executes only class from first execution
Pom:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>first</id>
<goals>
<goal>java</goal>
</goals>
<phase>test-compile</phase>
<configuration>
<mainClass>com.myPackage.AssignTest</mainClass>
</configuration>
</execution>
<execution>
<id>second</id>
<goals>
<goal>java</goal>
</goals>
<phase>test-compile</phase>
<configuration>
<mainClass>com.myPackage.CompareTest</mainClass>
</configuration>
</execution>
</executions>
</plugin>
Does somebody know where is an error?