When running a gradle build it stops resolving other repositories if it receives a http 403 error. The only slightly related issue i could find on google was Http status code 403 stops ivy resolver? . Is that because gradle is using the IVY resolver?
17:38:58.775 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker,5,main]] finished, busy: 1 mins 38.959 secs, idle: 0.053 secs 17:38:58.788 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 17:38:58.788 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 17:38:58.788 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 17:38:58.789 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 17:38:58.789 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not resolve all dependencies for configuration ':myproject1:myproject2:testRuntime'. 17:38:58.789 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not download ant.jar (org.apache.ant:ant:1.9.6) 17:38:58.789 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not get resource 'http://myrepo/org/apache/ant/ant/1.9.6/ant-1.9.6.jar'. 17:38:58.790 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not HEAD 'http://myrepo/org/apache/ant/ant/1.9.6/ant-1.9.6.jar'. Received status code 403 from server: Forbidden 17:38:58.790 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 17:38:58.790 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try: 17:38:58.791 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 17:38:58.791 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 17:38:58.792 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED 17:38:58.792 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 17:38:58.792 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] Total time: 2 mins 21.037 secs
with Full stack trace:
* Exception is: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':myproject:myproject1:testRuntime'. at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.wrapException(ErrorHandlingConfigurationResolver.java:70) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.access$000(ErrorHandlingConfigurationResolver.java:33) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingConfigurationResolver.java:208) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:695) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:317) at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:202) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:114) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:85) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:188) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:109) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:85) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:188) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:109) at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:85) ... at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:293) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download ant.jar (org.apache.ant:ant:1.9.6) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveArtifact(ExternalResourceResolver.java:273) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveArtifact(ExternalResourceResolver.java:483) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess$5.run(CacheLockReleasingModuleComponentsRepository.java:105) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:242) at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:313) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:114) at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.longRunningOperation(DefaultCacheFactory.java:179) at at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64) at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFiles(DefaultLenientConfiguration.java:149) at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFilesStrict(DefaultLenientConfiguration.java:121) at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.getFiles(DefaultResolvedConfiguration.java:45) at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver$FilesAggregatingResolvedConfiguration.getFiles(SelfResolvingDependencyConfigurationResolver.java:87) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingConfigurationResolver.java:206) ... 89 more Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'http://myrepo/org/apache/ant/ant/1.9.6/ant-1.9.6.jar'. at org.gradle.internal.resource.ResourceExceptions.failure(ResourceExceptions.java:69) at org.gradle.internal.resource.ResourceExceptions.getFailed(ResourceExceptions.java:52) at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:101) at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.resolveArtifact(DefaultExternalResourceArtifactResolver.java:62) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.download(ExternalResourceResolver.java:285) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveArtifact(ExternalResourceResolver.java:271) ... 128 more Caused by: org.gradle.api.UncheckedIOException: Could not HEAD 'http://myrepo/org/apache/ant/ant/1.9.6/ant-1.9.6.jar'. Received status code 403 from server: Forbidden at org.gradle.internal.resource.transport.http.HttpClientHelper.processResponse(HttpClientHelper.java:112) at org.gradle.internal.resource.transport.http.HttpClientHelper.performHead(HttpClientHelper.java:54) at org.gradle.internal.resource.transport.http.HttpResourceAccessor.getMetaData(HttpResourceAccessor.java:85) at org.gradle.internal.resource.transfer.DefaultExternalResourceConnector.getMetaData(DefaultExternalResourceConnector.java:63) at org.gradle.internal.resource.transport.DefaultExternalResourceRepository.getResourceMetaData(DefaultExternalResourceRepository.java:68) at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:85) at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:92) ... 131 more