天天看点

关于maven的tomcat7插件之deploy I/O 异常

[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ RestApi ---
[INFO] Deploying war to http://localhost:8080/  
Uploading: http://localhost:8080/manager/text/deploy?path=%2F


[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2F


[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2F


[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://localhost:8080/manager/text/deploy?path=%2F


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
           

这个是因为在webapps下已经存在了这个项目。无法执行覆盖更新命令,需要执行redeploy命令才可以覆盖更新。或者执行undeploy先卸载存在的项目,然后再执行deploy即可。