Failed to execute goal on project xxx: Could not resolve dependencies for project com
錯誤描述:
Failed to execute goal on project xxx: Could not resolve dependencies for project com.jd.ka:xxx:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.jd.ka:ka-explore-service:jar:0.0.1-SNAPSHOT, com.jd.ka:ka-explore-rpc:jar:0.0.1-SNAPSHOT: Failure to find com.jd.ka:ka-explore-service:jar:0.0.1-SNAPSHOT in http://artifactory.jd.com/libs-snapshots-local was cached in the local repository, resolution will not be reattempted until the update interval of snapshots_local has elapsed or updates are forced -> [Help 1]
解決方案:
1、首先,相信既然你犯了這樣的錯誤,那么你的項目應該也是多個module的。就像下圖:
2、我這里就舉個例子,所以應用的也就是web和service這兩個項目。
3、兩個項目都繼承父項目
4、在模塊中web依賴于service,在web中執行完clean和install之后,本地倉庫也存在依賴,但是在service中進行install就會出現
Failed to execute goal on project …: Could not resolve dependencies for project …
這樣測錯誤,最后發現原來是自己沒有首先對父項目也就是interface-test項目進行clean和install ,
5、總結、在父項目下有的子項目在首次運行clean 和install前應該先運行父項目的clean和install
超強干貨來襲 云風專訪:近40年碼齡,通宵達旦的技術人生總結
以上是生活随笔為你收集整理的Failed to execute goal on project xxx: Could not resolve dependencies for project com的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 推荐idea快捷键
- 下一篇: ajax post传输到后台为空?【解决