I've got 2 applications (as WAR files) that I need to run on pre-integration phase before executing my test scenarios. I've already configure the maven cargo plugin like this :
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven3-plugin</artifactId>
<version>1.9.8</version>
<executions>
<execution>
<id>neo-start-lanceur</id>
<phase>pre-integration-test</phase>
<configuration>
<container>
<containerId>tomcat8x</containerId>
<artifactInstaller>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat</artifactId>
<version>8.5.9</version>
</artifactInstaller>
</container>
<configuration>
<properties>
<cargo.servlet.port>8081</cargo.servlet.port>
<spring.profiles.active>tdc</spring.profiles.active>
<JAVA_OPTS>-Xms512m -Xmx1536m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=70</JAVA_OPTS>
</properties>
<home>${project.build.directory}/neo-lanceur</home>
</configuration>
<deployables>
<deployable>
<groupId>fr.cnp.neo</groupId>
<artifactId>neo-web-lanceur</artifactId>
<type>war</type>
</deployable>
</deployables>
</configuration>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>neo-stop-lanceur</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
<execution>
<id>neo-start-webapp</id>
<phase>pre-integration-test</phase>
<configuration>
<container>
<containerId>tomcat8x</containerId>
<artifactInstaller>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat8</artifactId>
<version>8.5.9</version>
</artifactInstaller>
</container>
<configuration>
<properties>
<cargo.servlet.port>8080</cargo.servlet.port>
<spring.profiles.active>tdc</spring.profiles.active>-->
<JAVA_OPTS>-Xms512m -Xmx1536m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=70</JAVA_OPTS>
</properties>
<home>${project.build.directory}/neo-webapp</home>
<configfiles>
<configfile>
<file>${project.basedir}/../web/src/test/conf/neo.properties</file>
<todir>webapps/neo-web/WEB-INF</todir>
</configfile>
</configfiles>
</configuration>
<deployables>
<deployable>
<groupId>fr.cnp.neo</groupId>
<artifactId>neo-web</artifactId>
<type>war</type>
</deployable>
</deployables>
</configuration>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>neo-stop-webapp</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
But it deployes and run only the first application.
Is it possible to deploy 2 WARs on a single tomcat instance or to create 2 local containers?
Thanks for your help !!