日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > javascript >内容正文

javascript

Spring Cloud项目MVN编译 -- Non-resolvable import POM

發布時間:2023/11/29 javascript 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Spring Cloud项目MVN编译 -- Non-resolvable import POM 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

  最近利用閑余時間,打算搭建一套基于Spring Cloud G版的微服務架構(Spring boot 2.1.0),一頓操作之后,IDEA也沒有提示什么錯誤,自認為微服務搭建完畢。啟動項目前,習慣性的Maven -clean了一下,我去,IDEA里面的Maven Projects里面一片紅,同時控制臺打印出如下錯誤:

[ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Non-resolvable import POM: Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Greenwich.M3 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 @ line 20, column 25@ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.jackpot:Logistics-management-platform:1.0-SNAPSHOT (/Users/Jackpot/Project/Logistics-management-platform/pom.xml) has 1 error [ERROR] Non-resolvable import POM: Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Greenwich.M3 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 @ line 20, column 25 -> [Help 2] [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/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelExceptionProcess finished with exit code 1

  錯誤提示很明顯--https://repo.maven.apache.org/maven2里面找不到Spring cloud G版的pom依賴。簡單的想了一下,之前的項目中,涉及到Spring的依賴都是https://repo.maven.apache.org/maven2里面的啊,為此我還特地打開網址看了看。

  

  額,為什么這里面的Spring 版本只到了2.0-M4?WTF??之后的版本在哪呢?Spring Cloud G版要求Spring boot版本必須為2.1.X,而Spring boot 2.1.x對應的Spring版本那可是Spring 5啊。遇到了問題,怎么解決了,首先我想到的是去官方文檔找答案,亂搜一通,沒有找到什么有價值的內容,官方沒有明確的答案,那就只有去“民間”找方法了,第一時間想到了stackoverflow,我開發過程中的一大利器。輸入Non-resolvable import POM,立馬就出現一大堆。搜索排除后,最終鎖定了--"https://stackoverflow.com/questions/47280247/non-resolvable-import-pom-failure-to-find",一位碼友的答案完美的解決了我的問題,給我指了"明路"。

  

  從這個回答中,很清楚的知道,Spring 2.0.0.M6版本后,依賴文件就不在https://repo.maven.apache.org/maven2里面了,而是在http://repo.spring.io/milestone/org/中,打開網址,一層層搜索,最終找到了http://repo.spring.io/milestone/org/springframework/spring/?,Spring的所有版本都在這里,那我只需要引入這個倉庫,就可以解決問題。

  

  在pom文件加入倉庫后,再一次Maven -clean,SUCCESS,然后Maven -compile,SUCCESS,項目也成功啟動了。

?

轉載于:https://www.cnblogs.com/JackpotHan/p/10774191.html

總結

以上是生活随笔為你收集整理的Spring Cloud项目MVN编译 -- Non-resolvable import POM的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。