springcloud-1: 用官方的pom.xml配置添加依赖失败
在eclipse中用STS生成了一个springcloud应用,pom.xml的核心配置如下:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.M9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId></groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId></groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
</dependencies><repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
用mvn install命令,报错如下:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.cloud:spring-cloud-dependencies:pom:Finchley.M9 from/to spring-milestones (https://repo.spring.io/milestone): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target @ line 43, column 16
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-netflix-eureka-server:jar is missing. @ line 29, column 15
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project net.common:eureka-server:1.0.0 (D:\develop\workspace\eureka-server\pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.cloud:spring-cloud-dependencies:pom:Finchley.M9 from/to spring-milestones (https://repo.spring.io/milestone): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target @ line 43, column 16 -> [Help 2]
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-netflix-eureka-server:jar is missing. @ line 29, column 15
[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
报的错误挺玄乎,好像和SSL有关,实际上就是说目标文件找不到。
经多方查找和测试,pom.xml中repositories改成如下,解决问题:
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repository.springframework.maven.release</id>
<name>Spring Framework Maven Release Repository</name>
<url>http://maven.springframework.org/milestone/</url>
</repository>
<repository>
<id>org.springframework</id>
<url> http://maven.springframework.org/snapshot</url>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Maven MILESTONE Repository</name>
<url>http://repo.spring.io/libs-milestone</url>
</repository>
<repository>
<id>spring-release</id>
<name>Spring Maven RELEASE Repository</name>
<url>http://repo.spring.io/libs-release</url>
</repository>
</repositories>
springcloud-1: 用官方的pom.xml配置添加依赖失败的更多相关文章
- maven的pom.xml配置json依赖
<dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</art ...
- 关于:maven项目中pom.xml文件添加依赖无法自动搜索的问题
用的是eclipse 1.Window------>Show View------->Maven Repositories(这个选项一般不直接显示,而在others里面) 2.操作完毕后会 ...
- pom.xml配置,针对mvn clean install -P参数(环境参数)打包
pom.xml配置,针对mvn clean install -P参数(环境参数)打包 比如你有2个环境,一个dev,一个prod, 然后你在mvn打包的时候,可以通过-P来打包,是打dev包,还是pr ...
- Maven-SSM项目pom.xml配置以及springmvc配置以及mybatis配置及web.xml配置
一.Maven本地仓库的pom.xml配置 (全部是mysql数据库) <project xmlns="http://maven.apache.org/POM/4.0.0" ...
- pom.xml 配置maven私服
1.pom.xml 配置maven私服 <repositories> <repository> <id>caf_repositories& ...
- pom.xml配置引用项目时不生效
1 在项目pom.xml配置中引用项目A,但是编译时,取提数引起是B: 2 原因是:[Java Build Path - Projects] 引用的还是老的项目B,删除该引用即可解决.
- spring之pom.xml配置
spring之pom.xml配置 <?xml version="1.0" encoding="UTF-8"?> <project xmlns= ...
- 云-腾讯云-笔记:pom.xml 配置
ylbtech-云-腾讯云-笔记:pom.xml 配置 1. pom.xml返回顶部 1.1 com.qcloud / 腾讯云 <!-- https://mvnrepository.com/ar ...
- SpringBooot-基础<2>-POM.xml配置
SpringBooot-基础<2>-POM.xml配置 项目创建完成后,需要配置pom.xml文件. pom.xml里面的配置,按需进行添加,这里提供一份参考,后面做笔记会都用到. < ...
随机推荐
- 2016vijos 1-2 股神小L(堆)
维护前i天的最优解,那么在后面可能会对前面几天的买卖情况进行调整 如果前面买入,买入的这个在后面一定不会卖出 如果前面卖出,卖出的这个可能会在后面变成买入,因为买这个,卖后面的会获得更多的收益 用一个 ...
- Linux下的解压命令
Linux下常见的压缩包格式有5种:zip tar.gz tar.bz2 tar.xz tar.Z 其中tar是种打包格式,gz和bz2等后缀才是指代压缩方式:gzip和bzip2 filename. ...
- 微信小程序ext_json示例
{ "template_id": 0, "ext_json": "{\"extEnable\": true, \"ext ...
- angularjs路由path方式实现原理探究
angularjs路由 https://angular.io/guide/router 通过URL解释, 来定位客户端生成的浏览器端视图. 你可绑定路由到页面的链接上, 当用户点击链接, 可以浏览到相 ...
- 三十四、Linux 进程与信号——信号特点、信号集和信号屏蔽函数
34.1 信号特点 信号的发生是随机的,但信号在何种条件下发生是可预测的 进程杠开始启动时,所有信号的处理方式要么默认,要么忽略:忽略是 SIGUSR1 和 SIGUSR2 两个信号,其他都采取默认方 ...
- Spring Data 起步
[Maven 坐标]G A V ……………………………………………………………………………………………………………………………………………… [JDBC] Connection 连接数据库 State ...
- Linux之备份(tar)/解压与压缩(gzip,bzip2,xz)【待完善】
[本博文,待完善] 以data原始文件为例,同tar备份,用xz压缩,实现备份->压缩整个过程的正向过程(生成.tar.xz)与其逆过程(先解压,后还原备份文件) 1.备份(tar) tar - ...
- cmd关闭被占用的端口命令及教程详解
//关闭端口占用命令eg:1. netstat -nao | findstr “8080” 查询8080端口2. taskkill /pid 3017 /F 关闭pid为3017的进程 //详解 ↓但 ...
- linux 扩展根分区
参考链接: http://blog.51cto.com/lubcdc/1763133
- 页面跳转、底部tabs切换页面
1.页面跳转 import { NavController } from 'ionic-angular'; constructor(public navCtrl: NavController) { } ...