<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven3-plugin</artifactId>
<version>${cargo.version}</version>
<configuration>
<container>
<containerId>tomcat7x</containerId>
<zipUrlInstaller>
<url>https://repo.maven.org/maven2/org/apache/tomcat/tomcat/7.0.68/tomcat-7.0.68.zip</url>
</zipUrlInstaller>
</container>
<configuration>
<home>${project.build.directory}/catalina-base</home>
<properties>
<cargo.servlet.port>${cargo.samples.servlet.port}</cargo.servlet.port>
<cargo.rmi.port>${cargo.samples.rmi.port}</cargo.rmi.port>
<cargo.tomcat.ajp.port>${cargo.samples.tomcat.ajp.port}</cargo.tomcat.ajp.port>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>org.codehaus.cargo</groupId>
<artifactId>sample-war</artifactId>
<type>war</type>
</deployable>
</deployables>
<packager>
<outputLocation>${project.build.directory}/tomcat-packaged</outputLocation>
</packager>
</configuration>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
<execution>
<id>package</id>
<phase>post-integration-test</phase>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>