Skip to content

Commit

Permalink
[Backport 1.2] Replace JCenter with Maven Central. (#1057) and update…
Browse files Browse the repository at this point in the history
… plugin repository order. (#1894)

* Replace JCenter with Maven Central. (#1057)

On February 3 2021, JFrog [announced](https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/) the shutdown of JCenter. Later on April 27 2021, an update was provided that the repository will only be read only and new package and versions are no longer accepted on JCenter.  This means we should no longer use JCenter for our central artifacts repository.

This change replaces JCenter with Maven Central as per the Gradle recommendation - https://blog.gradle.org/jcenter-shutdown

Signed-off-by: Rabi Panda <[email protected]>

* Define plugin repositories order in settings.gradle.

Signed-off-by: Marc Handalian <[email protected]>

Co-authored-by: Rabi Panda <[email protected]>
  • Loading branch information
mch2 and adnapibar authored Jan 12, 2022
1 parent c7e9b2d commit afdaae4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ tasks.withType(JavaCompile).configureEach {
*****************************************************************************/

repositories {
jcenter()
mavenCentral()
gradlePluginPortal()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class OpenSearchTestBasePluginFuncTest extends AbstractGradleFuncTest {
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static void configureRepositories(Project project) {
// such that we don't have to pass hardcoded files to gradle
repos.mavenLocal();
}
repos.jcenter();
repos.mavenCentral();

String luceneVersion = VersionProperties.getLucene();
if (luceneVersion.contains("-snapshot")) {
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/testKit/opensearch.build/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repositories {
artifact()
}
}
jcenter()
mavenCentral()
}

repositories {
Expand All @@ -53,7 +53,7 @@ repositories {
artifact()
}
}
jcenter()
mavenCentral()
}

// todo remove offending rules
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/testKit/testingConventions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ allprojects {
apply plugin: 'opensearch.build'

repositories {
jcenter()
mavenCentral()
}
dependencies {
testImplementation "junit:junit:4.13.1"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/testKit/thirdPartyAudit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repositories {
artifact()
}
}
jcenter()
mavenCentral()
}

dependencies {
Expand Down
7 changes: 7 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
* GitHub history for details.
*/

pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "com.gradle.enterprise" version "3.5"
}
Expand Down

0 comments on commit afdaae4

Please sign in to comment.