如何列出配置的存储库? [英] How to list the configured repositories?
问题描述
背景:我有一个相当复杂的gradle构建脚本和 github.com/hildo/netbeans-gradle-javaee-project/issues/19#issuecomment-133431188rel =noreferrertitle =无法下载依赖关系的来源>无法让我的NetBeans下载来源对于Maven依赖关系。在那个问题报告中,我建议仔细检查 mavenCentral
被导入的顺序。
对于任何感兴趣的人,这里是列出加载的存储库的代码(谢谢 @kelemen ):
任务listrepos {
doLast {
println存储库:
project.repositories.each {println名称:+ it.name +; url:+ it.url}
}
}
将此代码添加到构建脚本后,执行 gradle listrepos
和voilà...
How can I list all the repositories configured for a project?
Background: I have a pretty complex gradle build script and cannot get my NetBeans to download the sources for maven dependencies. In that issue-report I was suggested to double check the order in which mavenCentral
is being imported.
For anyone interested, here is the code to list the loaded repositories (thanks @kelemen):
task listrepos {
doLast {
println "Repositories:"
project.repositories.each { println "Name: " + it.name + "; url: " + it.url }
}
}
After adding this code to the build script, execute gradle listrepos
and voilà...
这篇关于如何列出配置的存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!