mvn compile 編譯問題
Could not resolve dependencies for project xxxxxx Failed to collect dependencies at xxxxx Failed to read artifact descriptor for xxxxxx : Failure to find xxxx in xxxxxx was cached in the local repository, resolution will not be reattempted until the update interval of eleme-pub has elapsed or updates are forced ->
此處由于公司保密政策,jar包和repository改成了xxxxx。
遇到這種情況有兩個原因:
1. 遠程倉庫的jar包有更新,但是沒有更新版本號。解決方案有兩種:
a. 去本地倉庫(通常是 ~/.m2/repository)找到對應版本的jar包,手動刪除
b. mvn 增加 -U參數。 意思是強制執行更新操作。
附: 可以去setting.xml文件中修改repository的updatePolicy,設置為always。
2. 第二種情況比較坑,就是你依賴的jar包中指定了parent。jar包部署了,但是parent版本沒有部署。
需要讓jar包提供方將parent部署上去。