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/UnresolvableModelException Process 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,项目也成功启动了。
Spring Cloud项目MVN编译 -- Non-resolvable import POM的更多相关文章
- spring cloud 项目创建过程
在使用spring cloud 项目创建微服务项目时,遇到过很多坑,现在我将整理如下: 条件:Idea 开发工具 maven 项目 1. 创建一个空的mvn项目. 2. 创建完了就添加Module,首 ...
- 如何使用windows版Docker并在IntelliJ IDEA使用Docker运行Spring Cloud项目
如何使用windows版Docker并在IntelliJ IDEA使用Docker运行Spring Cloud项目 #1:前提准备 1.1 首先请确认你的电脑是windows10专业版或企业版,只有这 ...
- 【spring】在spring cloud项目中使用@ControllerAdvice做自定义异常拦截,无效 解决原因
之前在spring boot服务中使用@ControllerAdvice做自定义异常拦截,完全没有问题!!! GitHub源码地址: 但是现在在spring cloud中使用@ControllerAd ...
- Spring Cloud项目
如何使用windows版Docker并在IntelliJ IDEA使用Docker运行Spring Cloud项目 如何使用windows版Docker并在IntelliJ IDEA使用Docke ...
- 关于spring cloud项目搭建问题
spring cloud 是基于spring boot搭建,父项目中引入依赖时候一定要将spring boot和spring cloud 的版本号对应起来,要不然jar包报错,项目也启动不起来!!!下 ...
- Spring Cloud项目中通过Feign进行内部服务调用发生401\407错误无返回信息的问题
问题描述 最近在使用Spring Cloud改造现有服务的工作中,在内部服务的调用方式上选择了Feign组件,由于服务与服务之间有权限控制,发现通过Feign来进行调用时如果发生了401.407错误时 ...
- IntelliJ 启动不同端口的两个spring cloud项目
IntelliJ 启动不同端口的两个spring cloud项目 1,使用maven进行clean package 2,在Terminal界面,输入java -jar xxx.jar --server ...
- Spring cloud项目实践(一)
链接地址:http://sail-y.github.io/2016/03/21/Spring-cloud%E9%A1%B9%E7%9B%AE%E5%AE%9E%E8%B7%B5/ 什么是Spring ...
- 十分钟快速创建 Spring Cloud 项目
一般来说,Intelij IDEA 可以通过 Maven Archetype 来快速生成Maven项目,其实 IDEA 集成了 Spring 官方提供的 Spring Initializr,可以非常方 ...
随机推荐
- PMP知识点(六)——项目经理权利类型
社会心理学家约翰.弗伦奇(John.French)和伯特伦.雷文(Bertram.Raven)在他们1959年发表的一篇迄今不朽的论文中,提出了五种权力类别的模型,这个模型折射出权力拥有者依赖的不同基 ...
- python3 练手实例7 斐波那契数列
'''a,b=0,1 x=int(input('请指定需要多少项:')) while x>0: print(b) a,b=b,a+b x-=1''' #递归 def fibo(n): if n& ...
- sleep、wait、notify、notifyAll的区别
Sleep 和wait 1. sleep是Thread类的静态方法,wait是Object类中定义的方法2. Thread.sleep不会导致锁行为的改变,如果当前线程是拥有锁的,那么Thread.s ...
- CentOS7 安装Python
CentOS7 安装Python 1. 前置条件 centos7 安装时 勾选Development Tools,如果你centos7没有选,需要更多必要库 必要库 # yum -y install ...
- 项目Alpha冲刺(团队)-第三天冲刺
格式描述 课程名称:软件工程1916|W(福州大学) 作业要求:项目Alpha冲刺(团队)-代码规范.冲刺任务与计划 团队名称:为了交项目干杯 作业目标:描述第三天冲刺的项目进展.问题困难.心得体会 ...
- 在虚拟机里连接PLC S7-200
1-使用PPI线连接 这次选择了在虚拟机里面来调试PLC,s7-200的型号是214-2AD23-0XB8 ,连接线是在淘宝上卖的(连接),在虚拟机里面试的时候没有反应,如下 在设备管理器里面观察,在 ...
- #10038.A Horrible Poem
#10038.A Horrible Poem 题目传送门 思路解析 既然这道题目在hash板块里,那么自然就可以想到用hash做这道题目. 首先我们可以用hash数组存储字符串的前缀的hash值. 因 ...
- (原创)lua日期、时间、时间戳的计算和转换
----------------------------------------------日期与时间 print("当前时间戳:") local nowTime = os.tim ...
- 对oracle用户创建asm磁盘
--root用户执行vi /etc/sysctl.conf #Install oracle settingfs.aio-max-nr = 1048576fs.file-max = 6815744#ke ...
- ebe2
Email:kefu007@vip.qq.com 软件每天有更新.请用Ctrl+F键搜索您需要的软件..如果你找不到你需要的软件可以联系客户服务人员帮您找! 海拉之光LucidShape光学设计仿真分 ...
