gpt4 book ai didi

gradle - 突然 "Could not resolve all dependencies...' org.apache.james :apache-mime4j:0. 6@jar' not found

转载 作者:行者123 更新时间:2023-12-04 06:43:15 28 4
gpt4 key购买 nike

我是 gradle 的新手,但我所从事的项目的构建已经独立工作了几个月。今天我尝试“分级”它,但我得到了一个相当神秘的错误......

bobk-mbp:DM_Server bobk$ gradle
:clean
:readme
:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Artifact 'org.apache.james:apache-mime4j:0.6@jar' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 7.114 secs

问题是我在我的依赖项部分对 org.apache.james:apache-mime4j 没有任何明确的依赖,所以它一定是在别的东西上。我如何确定我的哪个依赖项实际上需要这个,然后我如何克服或解决这个丢失的工件?

最佳答案

那很有趣。 Maven 的依赖项的 gradle 等价物:树是

gradle dependencies
compile - Classpath for compiling the main sources.
+--- com.google.guava:guava:11.0.2 [default]
| \--- com.google.code.findbugs:jsr305:1.3.9 [compile,master,runtime]
...
+--- org.jboss.resteasy:resteasy-multipart-provider:2.3.0.GA [default]
| +--- javax.mail:mail:1.4.4 [compile,master,runtime]
| | \--- javax.activation:activation:1.1 [compile,master,runtime]
| +--- org.apache.james:apache-mime4j:0.6 [compile,master,runtime]

这表明我对詹姆斯的依赖是通过 resteasy 来的。这些知识本身并没有帮助。看来我的本地缓存坏了。 Nuking 本地 m2 缓存 (~/.m2) 解决了这个问题(我开始 rm -rf 一次一个包,但很快就变老了)。
rm -rf ~/.m2

显然,关于这个基础设施,我需要了解很多。我相信有更好的方法来做到这一点。

关于gradle - 突然 "Could not resolve all dependencies...' org.apache.james :apache-mime4j:0. 6@jar' not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11001954/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com