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

成功启动

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值