2011-06-22 105 views
4

我正在尝试使用cargo-maven插件构建并重新部署到远程tomcat 7服务器。我已经能够成功部署到远程服务器,但所有其他操作都失败。使用cargo-maven-plugin无法重新部署到远程tomcat 7

这里是我的pom.xml

 <plugin> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-maven2-plugin</artifactId> 
      <version>1.1.1</version> 
      <configuration> 
       <!-- Container configuration --> 
       <container> 
        <containerId>tomcat7x</containerId> 
        <type>remote</type> 
       </container> 
       <configuration> 
        <type>runtime</type> 
        <properties> 
         <cargo.remote.username>tomcat</cargo.remote.username> 
         <cargo.remote.password>tomcat</cargo.remote.password> 
         <cargo.remote.uri>http://devserver:8080/manager/html</cargo.remote.uri> 
        </properties> 
       </configuration> 
      </configuration>     
     </plugin> 

的pluging设置这是我在Eclipse中看到的错误,当我尝试部署。我将其发布到pastebin,以便阅读。 Error link。任何帮助,这是非常感谢。

回答

10

对于任何想知道答案的人。看看for a caveat with tomcat 7.

你可以使用这样的东西。

<plugin> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-maven2-plugin</artifactId> 
      <version>1.1.1</version> 
      <configuration> 
       <container> 
        <containerId>tomcat7x</containerId> 
        <type>remote</type> 
       </container> 
       <configuration> 
        <type>runtime</type> 
        <properties> 
         <cargo.remote.username>devuser</cargo.remote.username> 
         <cargo.remote.password>86gphpphp</cargo.remote.password> 
         <cargo.remote.uri>http://192.168.2.116:8080/manager/text</cargo.remote.uri> 
        </properties> 
        <deployables> 
         <deployable> 
          <groupId>com.fiobox</groupId> 
          <artifactId>fiobox</artifactId> 
          <type>war</type> 
         </deployable> 
        </deployables> 
       </configuration> 
      </configuration> 
     </plugin> 
相关问题