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。
遇到這種情況有兩個(gè)原因:
1. 遠(yuǎn)程倉(cāng)庫(kù)的jar包有更新,但是沒有更新版本號(hào)。解決方案有兩種:
a. 去本地倉(cāng)庫(kù)(通常是 ~/.m2/repository)找到對(duì)應(yīng)版本的jar包,手動(dòng)刪除
b. mvn 增加 -U參數(shù)。 意思是強(qiáng)制執(zhí)行更新操作。
附: 可以去setting.xml文件中修改repository的updatePolicy,設(shè)置為always。
2. 第二種情況比較坑,就是你依賴的jar包中指定了parent。jar包部署了,但是parent版本沒有部署。
需要讓jar包提供方將parent部署上去。