検索

ホームページ  >  に質問  >  本文

java - mvn tomcat7:deploy执行成功但是项目并没有真正部署到tomcat

问题描述

运行mvn tomcat7:deploy后显示项目部署成功:

$ mvn tomcat7:deploy
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.893 s
[INFO] Finished at: 2017-04-14T17:44:30+08:00
[INFO] Final Memory: 13M/105M
[INFO] ------------------------------------------------------------------------

但是随后查看webapps下面可以发现项目并没有成功部署:

$ ls /usr/local/tomcat/webapps
docs  examples  host-manager  manager  ROOT

具体配置

pom.xml

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <server>tomcat</server>
                    <url>http://localhost:8080/manager/html</url>
                    <path>/test</path>
                    <update>true</update>
                </configuration>
            </plugin>
        </plugins>
    </build>

~/.m2/setting.xml

      <server>
          <id>tomcat</id>
          <username>admin</username>
          <password>123456</password>
      </server>

/usr/local/tomcat/conf/tomcat-users.xml

    <role name="manager-script"/>
    <role rolename="manager-gui"/>
    <user username="admin" password="123456" roles="manager-script"/>
    <user username="admin" password="123456" roles="manager-gui"/>

请问上面的步骤哪里出现了问题?为什么项目并没有成功部署到webapps下面?

PHP中文网PHP中文网2804日前712

全員に返信(0)返信します

応答なし
  • キャンセル返事