【发布时间】:2016-02-03 04:08:25
【问题描述】:
当我使用命令部署 maven 项目时
mvn 全新安装
我收到以下错误
错误:
未能执行目标 org.codehaus.mojo: tomcat-maven-plugin:1.1 : 项目 testapp 上仅部署(默认 - cli):无法调用 Tomcat 管理器:服务器返回 HTTP 响应代码:403 用于 URL:http : //localhost : 8080/manager/html/deploy?path=%2Ftestapp&war = ->
我更改了pom.xml中的代码
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<url>http://localhost:8080/manager/html</url>
<warFile>target/testapp.war</warFile>
</configuration>
</plugin>
当我更改配置网址时
http://localhost:8080/manager/html
chaned to
http://localhost:8080/manager/text
那么我的maven项目就部署成功了。
我做得对吗?
我可以知道它们之间的确切区别吗?
谢谢。
【问题讨论】:
-
tomcat 的哪个版本?
-
我使用的是7.0.42版本