I’m trying to force Gradle to use only one repository which is accessible on the internal network and which should be a mirror for all public repositories. I spend on it already 4 days without no success.
Gradle correctly download resource maven-metadata.xml from the internal repo, check the versions, then download play-services-measurement-base-17.2.0.pom, everything OK. And then it suddenly starts to downloading it again from https://repo.maven.apache.org/maven2.
Why? It is possible to found a reason? In --debug is nothing, as you can see here in the log
[12:08:58] : [docker] 10:08:50.206 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation ‘Download https://artifactory.int.company.com/artifactory/maven/com/google/android/gms/play-services-measurement-base/maven-metadata.xml’ completed
[12:08:58] : [docker] 10:08:50.207 [DEBUG] [org.gradle.api.internal.artifacts.repositories.maven.MavenMetadataLoader] parsing maven-metadata: org.gradle.internal.resource.local.DefaultLocallyAvailableExternalResource@447f8bd4
[12:08:58] : [docker] 10:08:50.212 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.dynamicversions.DefaultModuleVersionsCache] Caching version list in module versions cache: Using ‘[15.0.0, 15.0.2, 15.0.4, 16.0.0, 16.0.2, 16.0.3, 16.0.4, 16.0.5, 16.3.0, 16.4.0, 16.5.0, 17.0.0, 17.0.1, 17.1.0, 17.2.0]’ for ‘com.google.android.gms:play-services-measurement-base’
[12:08:58] : [docker] 10:08:50.213 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading https://artifactory.int.company.com/artifactory/maven/com/google/android/gms/play-services-measurement-base/17.2.0/play-services-measurement-base-17.2.0.pom
[12:08:58] : [docker] 10:08:50.213 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: https://artifactory.int.company.com/artifactory/maven/com/google/android/gms/play-services-measurement-base/17.2.0/play-services-measurement-base-17.2.0.pom
[12:08:58] : [docker] 10:08:50.213 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation ‘Download https://artifactory.int.company.com/artifactory/maven/com/google/android/gms/play-services-measurement-base/17.2.0/play-services-measurement-base-17.2.0.pom’ started
[12:08:58] : [docker] 10:08:50.213 [DEBUG] [org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing external resource: https://artifactory.int.company.com/artifactory/maven/com/google/android/gms/play-services-measurement-base/17.2.0/play-services-measurement-base-17.2.0.pom
[12:08:58] : [docker] 10:08:50.213 [DEBUG] [org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP GET: https://artifactory.int.company.com/artifactory/maven/com/google/android/gms/play-services-measurement-base/17.2.0/play-services-measurement-base-17.2.0.pom
[12:08:58] : [docker] 10:08:50.214 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
[12:08:58] : [docker] 10:08:50.214 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
[12:08:58] : [docker] 10:08:50.341 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: https://repo.maven.apache.org/maven2/com/google/android/gms/play-services-measurement-base/maven-metadata.xml
[12:08:58] : [docker] 10:08:50.341 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation ‘Download https://repo.maven.apache.org/maven2/com/google/android/gms/play-services-measurement-base/maven-metadata.xml’ started
[12:08:58] : [docker] 10:08:50.341 [DEBUG] [org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing external resource: https://repo.maven.apache.org/maven2/com/google/android/gms/play-services-measurement-base/maven-metadata.xml
[12:08:58] : [docker] 10:08:50.341 [DEBUG] [org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP GET: https://repo.maven.apache.org/maven2/com/google/android/gms/play-services-measurement-base/maven-metadata.xml
[12:08:58] : [docker] 10:08:50.342 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
[12:08:58] : [docker] 10:08:50.342 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context