springcloud-1:⽤官⽅的l配置添加依赖失败
在eclipse中⽤STS⽣成了⼀个springcloud应⽤,l的核⼼配置如下:
<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>
springcloud和springboot<url>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 (repo.spring.io/milestone): sun.security.validator.ValidatorException: PKI [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 netmon:eureka-server:1.0.0 (D:\develop\workspace\l) 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 (repo.spring.io/milestone): sun.security.validator.ValidatorException: P [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] /confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] /confluence/display/MAVEN/UnresolvableModelException
报的错误挺⽞乎,好像和SSL有关,实际上就是说⽬标⽂件不到。
经多⽅查和测试,l中repositories改成如下,解决问题:
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repository.lease</id>
<name>Spring Framework Maven Release Repository</name>
<url>/milestone/</url>
</repository>
<repository>
<id>org.springframework</id>
<url> /snapshot</url>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Maven MILESTONE Repository</name>
<url>repo.spring.io/libs-milestone</url>
</repository>
<repository>
<id>spring-release</id>
<name>Spring Maven RELEASE Repository</name>
<url>repo.spring.io/libs-release</url>
</repository>
</repositories>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。