关于maven 执行install 报错问题

错误1

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32:32 min
[INFO] Finished at: 2018-09-13T16:08:48+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project api: Could not resolve dependencies for project com.jhr:api:jar:1.0-SNAPSHOT: Could not transfer artifact org.springframework:spring-beans:jar:3.2.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): GET request of: org/springframework/spring-beans/3.2.4.RELEASE/spring-beans-3.2.4.RELEASE.jar from central failed: Read timed out -> [Help 1]
[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/DependencyResolutionException

解决思路:
先将parent工程(最外面的哪个)pom 先clean   --> 然后再 install
还不行,重启一下idea,再clean - install

 

错误2

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project client: Could not resolve dependencies for project com.jhr:client:jar:1.0-SNAPSHOT: Could not find artifact com.jhr:dubbotest:jar:1.0-SNAPSHOT -> [Help 1]
[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/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :client

出错情况:

在对parent工程(最外面的哪个)pom 先clean,后install时,发现parent的pom依赖 子模块,install parent的时候出现 找不到 子模块;而子模块进行install时出现错误,无法执行;


原因:子模块与父工程 的dependency出现错误

解决思路:重新检查各个模块的dependency是否出现错误,并修改

例如: 我的项目的相关依赖关系为   服务者与消费者 都依赖于 api模块,

但出错的原因变成:服务者与消费者 都依赖于父工程,而父工程进行install时需先将子模块先进行install;所以出现死循环。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值