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.
Alberto
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à...
来源:https://stackoverflow.com/questions/32143437/how-to-list-the-configured-repositories