2013-08-19 45 views
0

我正在尝试使用cargo插件部署servlet项目。通过货运maven插件远程执行项目部署

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 e.g项目; example.com但是当我运行mvn cargo:doploy我得到:

Connection timed out 

那是因为它试图将项目部署到:

http://example.com:/manager 

任何想法,我怎么才能把URL冒号(:)?

回答

0

如果从配置属性中删除cargo.servlet.port,会发生什么情况?我相信你的URL中的空端口将消失。

+0

我已经试过了,得到相同的url:'http://example.com:/ manager' – tokhi

+0

你可以尝试使用默认的80端口。 –

+0

我想当时的一项工作是将端口设置为80 – hermansen