4

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>

さらに構成が必要ですか? そして、どのコマンドを使用してデプロイしますか?

4

1 に答える 1

3

私は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

于 2012-06-30T15:08:19.890 に答える