Browse Source

Swithc to jcenter and hope to have fewer network failures in builds (#35427)

* Swithc to jcenter

Jcenter suposedly operates on a CDN.
It should be faster and more reliable.
It's the default in Andorid Studio currently
( it switched from mavenCentral ).

This change is safe because jcenter is a superset of mavenCentral.

* update comment
Alpar Torok 7 years ago
parent
commit
b49f461bf1

+ 0 - 1
buildSrc/build.gradle

@@ -142,7 +142,6 @@ if (project == rootProject) {
     if (System.getProperty("repos.mavenLocal") != null) {
       mavenLocal()
     }
-    mavenCentral()
   }
   test {
     include "**/*Tests.class"

+ 1 - 1
buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

@@ -442,7 +442,7 @@ class BuildPlugin implements Plugin<Project> {
             // such that we don't have to pass hardcoded files to gradle
             repos.mavenLocal()
         }
-        repos.mavenCentral()
+        repos.jcenter()
         repos.maven {
             name "elastic"
             url "https://artifacts.elastic.co/maven"

+ 1 - 2
buildSrc/src/main/groovy/org/elasticsearch/gradle/vagrant/VagrantTestPlugin.groovy

@@ -159,8 +159,7 @@ class VagrantTestPlugin implements Plugin<Project> {
     private static void configurePackagingArchiveRepositories(Project project) {
         RepositoryHandler repos = project.repositories
 
-        // Try maven central first, it'll have releases before 5.0.0
-        repos.mavenCentral()
+        repos.jcenter() // will have releases before 5.0.0
 
         /* Setup a repository that tries to download from
           https://artifacts.elastic.co/downloads/elasticsearch/[module]-[revision].[ext]

+ 1 - 1
buildSrc/src/testKit/elasticsearch.build/build.gradle

@@ -13,7 +13,7 @@ dependencies {
 }
 
 repositories {
-    mavenCentral()
+    jcenter()
     repositories {
         maven {
             url System.getProperty("local.repo.path")

+ 1 - 1
buildSrc/src/testKit/jarHell/build.gradle

@@ -13,7 +13,7 @@ ext.licenseFile = file("$buildDir/dummy/license")
 ext.noticeFile = file("$buildDir/dummy/notice")
 
 repositories {
-    mavenCentral()
+    jcenter()
     repositories {
         maven {
             url System.getProperty("local.repo.path")

+ 0 - 1
qa/wildfly/build.gradle

@@ -35,7 +35,6 @@ final String wildflyInstall = "${buildDir}/wildfly/wildfly-${wildflyVersion}"
 int managementPort
 
 repositories {
-    mavenCentral()
     // the Wildfly distribution is not available via a repository, so we fake an Ivy repository on top of the download site
     ivy {
         url "http://download.jboss.org"