We use Cargo with Maven on the build server to remotely deploy the WAR file from our build server to the internal QA server for testing.
Our current POM for the project is shown below and works correctly for quick deployment.
The problem is that instead of a hot deployment, we would like the Cargo plugin to stop the Tomcat instance, deploy the new WAR, and start Tomcat. Is there a way to change the POM to manage this scenario?
Our Maven build is defined as:
mvn clean deploy ... cargo:redeploy
And the boot plugin settings in POM:
<plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <configuration> <container> <containerId>tomcat7x</containerId> <type>remote</type> <systemProperties> <cargo.jvmargs>-XX:MaxPermSize=256M -Xmx1024m</cargo.jvmargs> </systemProperties> </container> <configuration> <type>runtime</type> <properties> <cargo.hostname>qa-server</cargo.hostname> <cargo.servlet.port>8080</cargo.servlet.port> <cargo.tomcat.manager.url>http://qa-server:8080/manager</cargo.tomcat.manager.url> <cargo.remote.username>username</cargo.remote.username> <cargo.remote.password>pass</cargo.remote.password> </properties> </configuration> <deployer> <type>remote</type> <deployables> <deployable> <groupId>com.ourcompany</groupId> <artifactId>myapp-artifactId</artifactId> <type>war</type> <properties> <context>latest</context> </properties> </deployable> </deployables> </deployer> </configuration> </plugin>
source share