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,可以非常方 ...
随机推荐
- 一秒钟带你走进P图世界-----(python)PIL库的使用
python-----PIL库的使用 一.什么是PIL库 1.PIL(Python Image Library)库是python语言的第三方库,具有强大的图像处理能力,不仅包含了丰富的像素.色彩操作功 ...
- SimpleDateFormat 线程不安全及解决方案
SimpleDateFormat定义 SimpleDateFormat 是一个以与语言环境有关的方式来格式化和解析日期的具体类.它允许进行格式化(日期 -> 文本).解析(文本 -> 日期 ...
- 四五月份:关键词是沟通、绘画和SQL
例行总结一下四五月份的感受. 关键词有三个:沟通.绘画和SQL. 整体来说,这两个月在努力跟这三个关键词死磕,略有些进展,因此汇报一下. 虽然这三个关键词从重要度来说是从左到右的,但从叙述来讲,还是先 ...
- .net 解压缩 rar文件
public static class RARHelper { public static bool ExistsWinRar() { bool result = false; string key ...
- kettle 分组
kettle 分组组可以实现group_concat的效果
- 工作经验-Oracle定时数据备份
Oracle database 11g express edition http://www.oracle.com/technetwork/cn/products/express-edition/do ...
- Python appium搭建app自动化测试环境
appium做app自动化测试,环境搭建是比较麻烦的. 也是很多初学者在学习app自动化之时,花很多时间都难跨越的坎. 但没有成功的环境,就没有办法继续后续的使用. 在app自动化测试当中,我们主要是 ...
- python序列化与反序列化(json与pickle)
在python中,序列化可以理解为将python中对象的编码格式转换为json(pickle)格式的字符串,而反序列化可以 理解为将json(pickle)格式的字符串转换为python中对象的编码格 ...
- vue 前端框架 (二) 表格增加搜索
本章知识点 归纳: 1.定义全局过滤器 以及 私有过滤器 2.定义全局指令 以及 定义私有指令 3.定义键盘修饰符 4.v-for 的函数引入 5.字符串的incluede 方法,.toString( ...
- Java并发编程之美之并发编程线程基础
什么是线程 进程是代码在数据集合上的一次运行活动,是系统进行资源分配和调度的基本单位,线程则是进程的一个执行路径,一个进程至少有一个线程,进程的多个线程共享进程的资源. java启动main函数其实就 ...