maven操作下:Failed to execute goal on project xxx: Could not resolve dependencies for project
< 返回列表时间: 2020-03-26来源:OSCHINA
【围观】麒麟芯片遭打压成绝版,华为亿元投入又砸向了哪里?>>>
错误描述:
Failed to execute goal on project xxx: Could not resolve dependencies for project com.jd.ka:xxx:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.jd.ka:ka-explore-service:jar:0.0.1-SNAPSHOT, com.jd.ka:ka-explore-rpc:jar:0.0.1-SNAPSHOT: Failure to find com.jd.ka:ka-explore-service:jar:0.0.1-SNAPSHOT in http://artifactory.jd.com/libs-snapshots-local was cached in the local repository, resolution will not be reattempted until the update interval of snapshots_local has elapsed or updates are forced -> [Help 1]
解决方案:
1、首先,相信既然你犯了这样的错误,那么你的项目应该也是多个module的。就像下图:

2、我这里就举个例子,所以应用的也就是web和service这两个项目。
3、两个项目都继承父项目
4、在模块中web依赖于service,在web中执行完clean和install之后,本地仓库也存在依赖,但是在service中进行install就会出现 Failed to execute goal on project ...: Could not resolve dependencies for project ...
这样测错误,最后发现原来是自己没有首先对父项目也就是interface-test项目进行clean和install ,
5、 总结、在父项目下有的子项目在首次运行clean 和install前应该先运行父项目的clean和install
热门排行