运行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
下面?
认证0级讲师