maven Could not resolve dependencies for project xxx:jar解决办法

maven打包或者导入依赖的时候报错:Failed to execute goal on project xxxx

[ERROR] Failed to execute goal on project actuator-testbed: Could not resolve dependencies for project org.springframework:actuator-testbed:jar:0.1.0: Failed to collect dependencies at org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar:1.4.0.RELEASE -> com.netflix.eureka:eureka-client:jar:1.4.11 -> com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0 -> com.netflix.archaius:archaius-core:jar:0.7.4 -> commons-configuration:commons-configuration:jar:1.8: Failed to read artifact descriptor for commons-configuration:commons-configuration:jar:1.8: Could not transfer artifact commons-configuration:commons-configuration:pom:1.8 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): /Users/xxxxxxxx/apache-maven-3.6.0/repository/commons-configuration/commons-configuration/1.8/commons-configuration-1.8.pom.part.lock (No such file or directory) ->

解决方案

1 删除对应本地仓库的:Users/xxxxxxxx/apache-maven-3.6.0/repository/commons-configuration/中commons-configuration包,这里报错因人而异,根据你自己的报错的依赖路径写,我这里是”commons-configuration“,删除之。

重新执行

mvn install

 
打包后启动:

或者

mvn spring-boot:run

成功启动

猜你喜欢

转载自blog.csdn.net/qq_38376348/article/details/106891341