Tomcat部署项目报错 Xxx could not be redeployed
一、问题
在Tomcat中重新部署项目时报错:
Xxx could not be redeployed because it could not be completely removed in the undeployment phase.
The most common cause of this problem is attempting to redeploy while the server is running, which has locked one or more files.
To correct the deployment you will need to stop the server and then redeploy the project before restarting the server.

按提示信息关闭Tomcat服务后仍然报错。
Deployment Status中显示:
Deployment is out of date due to changes in the underlying project contents. You'll need to manually 'Redeploy' the project to update the deployed archive.
二、解决方法
经过排查发现是pom.xml中配置的一个Jar并未下载成功,可能此时相关目录被锁定了,删除或更换jar的版本,在Maven Dependencies中成功看到下载的Jar后再部署项目取可Successfully deployed.。