使用cargo-maven2-plugin(1.0.6)进行远程部署时遇到问题。我正在部署的战争相当大,默认的20秒不足以完成整个部署。 实际的例外是(20秒后):
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.6:deploy (default-cli) on project myproject: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.0.6:deploy failed: Failed to deploy [path/myproject.war]: Connection timed out: connect -> [Help 1]
我的货物配置如下:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.6</version>
<configuration>
<wait>true</wait>
<container>
<containerId>tomcat7x</containerId>
<type>remote</type>
<timeout>600000</timeout>
</container>
<configuration>
<type>runtime</type> <!-- or remote -->
<properties>
<cargo.tomcat.manager.url>http://...:8080/manager/text</cargo.tomcat.manager.url>
<cargo.remote.username>...</cargo.remote.username>
<cargo.remote.password>...</cargo.remote.password>
<cargo.hostname>...</cargo.hostname>
<cargo.servlet.port>8080</cargo.servlet.port>
</properties>
</configuration>
<deployer>
<type>remote</type> <!-- or installed -->
<deployables>
<deployable>
<groupId>...</groupId>
<artifactId>...</artifactId>
<type>war</type>
<properties>
<context>...</context>
</properties>
<pingURL>http://www.myProject.com:8080/</pingURL>
<pingTimeout>25000</pingTimeout>
</deployable>
</deployables>
</deployer>
</configuration>
<executions></executions>
</plugin>