Use repo.spring.io's Maven Central mirror

Closes gh-246
This commit is contained in:
Andy Wilkinson
2024-09-24 09:10:18 +01:00
parent e667e3158a
commit 5348b4b32d
6 changed files with 42 additions and 21 deletions

View File

@@ -29,7 +29,17 @@ repositories {
includeGroupByRegex("org.springframework.*")
}
}
mavenCentral()
maven {
name "Maven Central Mirror"
url "https://repo.spring.io/repo1"
credentials {
username System.env['REPO_SPRING_IO_USERNAME']
password System.env['REPO_SPRING_IO_PASSWORD']
}
mavenContent {
releasesOnly()
}
}
maven {
url "https://repo.spring.io/snapshot"
mavenContent {

View File

@@ -1,16 +0,0 @@
plugins {
id "java"
id "io.spring.javaformat"
id "org.springframework.boot" apply false
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }
}
dependencies {
implementation(enforcedPlatform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
implementation("org.springframework:spring-core")
}

View File

@@ -29,7 +29,17 @@ repositories {
includeGroupByRegex("org.springframework.*")
}
}
mavenCentral()
maven {
name "Maven Central Mirror"
url "https://repo.spring.io/repo1"
credentials {
username System.env['REPO_SPRING_IO_USERNAME']
password System.env['REPO_SPRING_IO_PASSWORD']
}
mavenContent {
releasesOnly()
}
}
maven {
url "https://repo.spring.io/snapshot"
mavenContent {

View File

@@ -12,7 +12,17 @@ pluginManagement {
id "io.spring.javaformat" version gradle.extensions.extraProperties.get("javaFormatVersion")
}
repositories {
mavenCentral()
maven {
name "Maven Central Mirror"
url "https://repo.spring.io/repo1"
credentials {
username System.env['REPO_SPRING_IO_USERNAME']
password System.env['REPO_SPRING_IO_PASSWORD']
}
mavenContent {
releasesOnly()
}
}
gradlePluginPortal()
}
}

View File

@@ -131,7 +131,15 @@ public class AotSmokeTestPlugin implements Plugin<Project> {
mavenContent.includeGroupByRegex("org.springframework.*");
});
});
project.getRepositories().mavenCentral();
project.getRepositories().maven((repo) -> {
repo.setName("Maven Central Mirror");
repo.setUrl("https://repo.spring.io/artifactory/repo1");
repo.credentials((credentials) -> {
credentials.setUsername(System.getenv().get("REPO_SPRING_IO_USERNAME"));
credentials.setPassword(System.getenv().get("REPO_SPRING_IO_PASSWORD"));
});
repo.mavenContent((mavenContent) -> mavenContent.releasesOnly());
});
project.getRepositories().maven((repo) -> {
repo.setName("Spring Snapshot");
repo.setUrl("https://repo.spring.io/snapshot");

View File

@@ -47,7 +47,6 @@ plugins {
rootProject.name="spring-aot-smoke-tests"
include "aot-smoke-test-support"
include "aot-smoke-test-third-party-hints"
["batch", "boot", "cloud", "data", "framework", "graphql", "integration", "security", "session"].each { group ->
file(group).eachDirMatch(~/[a-z].*/) { smokeTest ->