首页 > 解决方案 > tomcat 8的Maven WAR部署问题

问题描述

我正在尝试将 WAR 文件从 maven 部署到 tomcat8。我为此做了以下配置并运行了 mvn tomcat7:deploy 命令。

  1. 在 tomcat-users.xml 中添加了特定的角色
  2. 在 maven settings.xml 中添加了 tomcatserver
  3. 在 pom.xml 中添加了 tomcat maven 插件

仍然收到以下错误。

INFO] Deploying war to http://localhost:8080/BeecroftShoppingWeb  
Uploading: http://localhost:8080/manager/text/deploy?path=%2FBeecroftShoppingWeb&update=true
2080/5359 KB   
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FBeecroftShoppingWeb&update=true
2110/5359 KB   
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FBeecroftShoppingWeb&update=true
2092/5359 KB   
[INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2FBeecroftShoppingWeb&update=true
2078/5359 KB   
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.987 s
[INFO] Finished at: 2018-08-23T23:10:26-04:00
[INFO] Final Memory: 15M/207M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project BeecroftShoppingWeb: Cannot invoke Tomcat manager: Broken pipe -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

标签: mavenspring-mvctomcat8

解决方案


推荐阅读