Maven基礎(chǔ):錯誤對應(yīng):was cached in the local repository的解決
Maven基礎(chǔ):錯誤對應(yīng):was cached in the local repository
現(xiàn)象
編譯的時候提示如下錯誤信息:
[ERROR] Failed to execute goal on project Spring-boot-activiti: Could not resolve dependencies for project xxxxxx-xxxxxx:Spring-boot-activiti:jar:1.1: Failure to find io.springfox:springfox-swagger-ui:jar:2.3.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
liumiaocn:devops-approval liumiao$
原因
因?yàn)殄e誤將springfox-swagger-ui的版本寫成2.3.2,導(dǎo)致的錯誤,看一下Central倉庫就可以看到?jīng)]有這個版本
對應(yīng)
- 方法1: 改回來再次mvn clean package即可。
- 方法2: 如果繼續(xù)出錯,考慮刪除springfox-swagger-ui的目錄,重新mvn clean package
- 方法3: 再出錯的話,把.m2下的repository整個刪除,重新mvn clean package
總結(jié)
以上為個人經(jīng)驗(yàn),希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
MyEclipse如何將項(xiàng)目的開發(fā)環(huán)境與服務(wù)器的JDK 版本保持一致
我們使用MyEclipse開發(fā)Java項(xiàng)目開發(fā)中,偶爾會遇到因項(xiàng)目開發(fā)環(huán)境不協(xié)調(diào),導(dǎo)致這樣那樣的問題,在這里以把所有環(huán)境調(diào)整為JDK1.6 為例,給大家詳細(xì)介紹MyEclipse如何將項(xiàng)目的開發(fā)環(huán)境與服務(wù)器的JDK 版本保持一致,需要的朋友參考下吧2024-04-04Java經(jīng)典面試題匯總:網(wǎng)絡(luò)編程
本篇總結(jié)的是Java 網(wǎng)絡(luò)編程相關(guān)的面試題,后續(xù)會持續(xù)更新,希望我的分享可以幫助到正在備戰(zhàn)面試的實(shí)習(xí)生或者已經(jīng)工作的同行,如果發(fā)現(xiàn)錯誤還望大家多多包涵,不吝賜教,謝謝2021-07-07JavaWeb如何實(shí)現(xiàn)統(tǒng)一查詢接口(jfinal)
這篇文章主要介紹了JavaWeb如何實(shí)現(xiàn)統(tǒng)一查詢接口(jfinal),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2020-06-06編寫調(diào)用新浪微博API的Java程序來發(fā)送微博
這篇文章主要介紹了編寫調(diào)用新浪微博API的Java程序來發(fā)送微博的方法,只是展示了一個基本的程序框架而非一個完整的圖形化軟件:)需要的朋友可以參考下2015-11-11