1. 程式人生 > 實用技巧 >spring-cloud maven依賴

spring-cloud maven依賴

異常:The build could not read 1 project -> [Help 1]   
The project com.atguigu.gulimail:gulimail-coupon:0.0.1-SNAPSHOT (D:\gulimail\gulimail-coupon\pom.xml) has 1 error
Non-resolvable import POM: Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:2020.0.0-M5 in http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus-aliyun has elapsed or updates are forced @ line 42, column 25 ->
[Help 2] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
解決:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
改為
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>2.1.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>