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.
You need to pass the repolist option to the yum command. This option will show you a list of configured repositories under RHEL / Fedora / SL / CentOS Linux. The default is to list all enabled repositories. Pass -v (verbose mode) optionn for more information is listed.
For Debian systems such as Ubuntu, you could use a command like the one shown below to list the repositories that are used when you update your system. This command selects sources from the /etc/apt/sources. list file and /etc/apt/sources. list.
You can use yum -v search that would show you packages along with repo it is present in. If you also add --showduplicates you will see all versions of that package.
If you want to list all the packages in a repository on your desktop, you can use Synaptic Package Manager. Synaptic is a graphical package management application for APT (APT being the main command line package manager for Debian and its derivatives).
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à...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With