I have a company Gradle project which I'm working on at home. It is failing to build in IntelliJ. Specifically, it is failing to download a Gradle plugin (a Spring Boot one). The settings.gradle file looks like this
pluginManagement {
repositories {
maven { url "https://urlA" }
maven { url "https://urlB" }
gradlePluginPortal()
}
}
rootProject.name = 'about'
When the build fails, I get this error
Plugin [id: 'org.springframework.boot', version: '2.3.3.RELEASE'] was not found in any of the following sources:
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.springframework.boot', version: '2.3.3.RELEASE'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.3.3.RELEASE')
Searched in the following repositories:
maven(https://urlA)
maven2(https://urlB)
Gradle Central Plugin Repository
<bunch of stack trace information here>
urlA is a URL for a network which is entirely air-gapped from the Internet. Yet oddly, the hostname in it actually resolves to an IP. I tried blocking this IP on my machine by running route add -host urlAHost reject thinking that would force Gradle to essentially ignore the that particular repo. No luck. urlB is for a host which is only accessible through a corporate VPN, which I have running.
The only way I can get this repo to build is to comment out the maven entry for urlA. I know that I could re-order the repositories and probably get this to work. However, none of my co-workers seem to have this issue and I'd rather understand what is going on with my machine in particular.
I'm using Gradle 6.5.1, IntelliJ Ultimate 2020.2.