Maven基礎:錯誤對應:was cached in the local repository的解決
Maven基礎:錯誤對應: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$
原因
因為錯誤將springfox-swagger-ui的版本寫成2.3.2,導致的錯誤,看一下Central倉庫就可以看到?jīng)]有這個版本
對應
- 方法1: 改回來再次mvn clean package即可。
- 方法2: 如果繼續(xù)出錯,考慮刪除springfox-swagger-ui的目錄,重新mvn clean package
- 方法3: 再出錯的話,把.m2下的repository整個刪除,重新mvn clean package
總結
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關文章
MyEclipse如何將項目的開發(fā)環(huán)境與服務器的JDK 版本保持一致
我們使用MyEclipse開發(fā)Java項目開發(fā)中,偶爾會遇到因項目開發(fā)環(huán)境不協(xié)調,導致這樣那樣的問題,在這里以把所有環(huán)境調整為JDK1.6 為例,給大家詳細介紹MyEclipse如何將項目的開發(fā)環(huán)境與服務器的JDK 版本保持一致,需要的朋友參考下吧2024-04-04JavaWeb如何實現(xiàn)統(tǒng)一查詢接口(jfinal)
這篇文章主要介紹了JavaWeb如何實現(xiàn)統(tǒng)一查詢接口(jfinal),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下2020-06-06