![](/img/trans.png)
[英]using cargo maven plugin to deploy spring project to remote server
[英]Project deployment on remote via Cargo maven plugin
我正在嘗試使用cargo
插件部署servlet項目。
pom.xml文件:
...
<!-- cargo plugin -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<container>
<containerId>tomcat6x</containerId>
<type>remote</type>
<systemProperties>
<cargo.jvmargs>-XX:MaxPermSize=256M -Xmx1024m</cargo.jvmargs>
</systemProperties>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.hostname>example.com</cargo.hostname>
<cargo.protocol>http</cargo.protocol>
<cargo.servlet.port></cargo.servlet.port>
<cargo.remote.username>verticals-renderer</cargo.remote.username>
<cargo.remote.password>verticals-renderer</cargo.remote.password>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>com.foo.foo</groupId>
<artifactId>foo-renderer</artifactId>
<type>war</type>
<properties>
<context>latest</context>
</properties>
</deployable>
</deployables>
</configuration>
</plugin>
<!-- End cargo plugin -->
...
如您所見,我想在遠程domain
上部署項目,例如; example.com
但是當我運行mvn cargo:doploy
我得到:
Connection timed out
那是因為它試圖將項目部署到:
http://example.com:/manager
任何想法我怎么能去掉冒號( :
從URL)?
如果從配置屬性中刪除cargo.servlet.port,會發生什么情況? 我相信您網址中的空端口將消失。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.