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,可以非常方 ...
随机推荐
- vue+element-ui实现显示隐藏密码
<template> <el-form :model="cuser_info" label-width="115px" label-posit ...
- JS 获取本月第一天零点时间戳并转化成yy-mm-dd
JS 获取本月第一天零点时间戳并转化成yy-mm-dd 格式 <!DOCTYPE html> <html> <head> <meta charset=&quo ...
- 1、jQuery的使用入门
一.创建一个WEB项目,在WebRoot下新建一个Jscript文件夹,并将jQuery中的jquery-3.1.1.min.js文件复制过来. 二.用<script>标签引入jQuery ...
- NIPS2017-The neural hawks process
NIPS2017哪些论文值得关注 论文链接 1.首先这篇文章研究的是 event stream,什么是event stream呢 ? 假如你是一个医生,你每天会看到很多病人 ,对于每一个病人,你都有他 ...
- UE4 行为树资料
Composites Select 选择 从左往右执行其子节点,直到一个达成,则 Select 达成并返回上层,否则失败并返回上层 Sequence 队列 从左往右执行其子节点,直到一个失败,则 Se ...
- typescript + echarts-for-react 制作渐变柱状图, 提示[ts] 类型“Graphic”上不存在属性“LinearGradient”
更新: 2019/03 无意间发现Graphic上已有 LinearGradient属性
- SVN clean失败解决方法
一.问题描述 1.svn 更新或者提交时,报错:svn cleanup failed–previous operation has not finished; run cleanup if it wa ...
- 多个Fragment在一个activity中通过按钮的展示方法
fragment使用方法 1. 创建主Mainactivity extends AppCompatActivity 2. Oncreate & setContentView 3. 完成XML的 ...
- java程序设计习题总结
---恢复内容开始--- main()方法的参数名可以改变:main()方法的参数个数不可以改变. 当一个程序没有main()方法是,是可以编译通过的,但是不能给运行,因为找不到一个主函数入口. 标识 ...
- python模块------shutil
说明 shutil -- High-level file operations 是一种高层次的文件操作工具 类似于高级API,而且主要强大之处在于其对文件的复制与删除操作更是比较支持好. copy() ...
