我们在构建服务器上使用Cargo with Maven来远程部署从我们的构建服务器到内部QA服务器的WAR文件进行测试。在Maven中使用Cargo来远程部署WAR没有HOT部署
我们目前的项目POM见下文,并适用于热部署。
问题是,而不是热部署,我们希望Cargo插件停止Tomcat实例,部署新的WAR,然后启动Tomcat。有没有办法改变POM来管理这种情况?
我们的Maven构建定义为:
mvn clean deploy ... cargo:redeploy
而在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>
热部署会出现什么问题?你有没有遇到过任何你希望货物停下来并启动'tomcat'的问题? – tokhi 2013-08-05 10:05:51