maven build, Downloading maven-metadata.xml 卡住的解决方案

[INFO] Building user-service 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://xxx.xxx.xxx.xxx:8081/repository/maven-public/com/beijing/test-service/0.0.1-SNAPSHOT/maven-metadata.xml
这种问题是因为maven仓库中需要下载的文件被锁了。 
这个时候只需要找到自己本地的maven仓库中对应的文件夹中的.lock 结尾的文件。 
例如上边的报错就找到 /Users/{自己的用户名}/.m2/repository/com/beijing/test-service/0.0.1-SNAPSHOT/ 
找到.lock结尾的文件,然后删除。

猜你喜欢

转载自blog.csdn.net/gpweixing/article/details/110686019