gradle无法解决关系依赖 [英] gradle can't resolve nexus dependency
本文介绍了gradle无法解决关系依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从本地关系中包含一个依赖项.我已经看到了几个相关的问题,它们都说可以做
I have a dependency I'd like to include from a local nexus. I've seen several related problems that all say to do something like
apply plugin: "java"
apply plugin: "maven"
repositories {
maven {
url "http://my.url.com/"
}
}
dependencies {
compile "name:id:version"
}
我可以通过网络访问网络,但是当我尝试上述操作时,我最终收到一条错误消息
I can access the nexus fine via web but when I try the above, I end up with a error message
无法解析:name:id:version
Could not resolve: name:id:version
任何帮助将不胜感激.
推荐答案
我发现了我的问题.当我最初没有--stacktrace选项从Eclipse构建时,我并没有捕获到传递依赖.我修改了构建脚本,这样
I found my problem. There were transitive dependencies I didn't catch as I was initially building from Eclipse without the --stacktrace option. I modified the build script such that
compile("name:id:version") {
exclude group: "another-name", module: "its-module"
// other dependencies to exclude ...
}
这篇关于gradle无法解决关系依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文