【问题标题】:how to deploy to remote server with tomcat7-maven-plugin如何使用 tomcat7-maven-plugin 部署到远程服务器
【发布时间】:2012-07-01 18:19:05
【问题描述】:

我想使用 tomcat7-maven-plugin 将 war 文件从我的本地机器部署到远程服务器,这是我目前的配置:

<plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.0-beta-1</version>
                <configuration>
                  <server>pb</server>
                  <url>http://mydomain.com:8080/manager/html</url>
                </configuration>
            </plugin>

我需要更多配置吗?以及我使用什么命令来部署?

【问题讨论】:

    标签: jakarta-ee tomcat maven maven-tomcat-plugin


    【解决方案1】:

    我必须将以下内容添加到 settings.xml:

    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          http://maven.apache.org/xsd/settings-1.0.0.xsd">
    
    
      <servers>
      <server>
            <id>pb</id>
            <username>myuser</username>
            <password>mypass</password>
      </server>
      </servers>
    
    </settings>
    

    并使用命令mvn tomcat7:deploy

    【讨论】:

      猜你喜欢
      • 2014-01-29
      • 2014-05-30
      • 1970-01-01
      • 2013-12-03
      • 2013-10-04
      • 1970-01-01
      • 2019-04-10
      • 2016-09-13
      • 2011-11-22
      相关资源
      最近更新 更多