mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Update CLI to work around Framework's early adoption of Bismuth-SR1
This commit is contained in:
parent
e561b969bf
commit
a6a8195ea8
@ -61,6 +61,8 @@ public final class RepositoryConfigurationFactory {
|
||||
MavenSettings mavenSettings = new MavenSettingsReader().readSettings();
|
||||
List<RepositoryConfiguration> repositoryConfiguration = new ArrayList<>();
|
||||
repositoryConfiguration.add(MAVEN_CENTRAL);
|
||||
repositoryConfiguration.add(new RepositoryConfiguration("spring-ext-release",
|
||||
URI.create("https://repo.spring.io/ext-release-local"), false));
|
||||
if (!Boolean.getBoolean("disableSpringSnapshotRepos")) {
|
||||
repositoryConfiguration.add(SPRING_MILESTONE);
|
||||
repositoryConfiguration.add(SPRING_SNAPSHOT);
|
||||
|
@ -40,7 +40,7 @@ public class RepositoryConfigurationFactoryTests {
|
||||
List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
|
||||
.createDefaultRepositoryConfiguration();
|
||||
assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
|
||||
"spring-snapshot", "spring-milestone");
|
||||
"spring-snapshot", "spring-milestone", "spring-ext-release");
|
||||
}, "user.home:src/test/resources/maven-settings/basic");
|
||||
}
|
||||
|
||||
@ -49,7 +49,8 @@ public class RepositoryConfigurationFactoryTests {
|
||||
SystemProperties.doWithSystemProperties(() -> {
|
||||
List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
|
||||
.createDefaultRepositoryConfiguration();
|
||||
assertRepositoryConfiguration(repositoryConfiguration, "central", "local");
|
||||
assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
|
||||
"spring-ext-release");
|
||||
}, "user.home:src/test/resources/maven-settings/basic",
|
||||
"disableSpringSnapshotRepos:true");
|
||||
}
|
||||
@ -60,7 +61,8 @@ public class RepositoryConfigurationFactoryTests {
|
||||
List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
|
||||
.createDefaultRepositoryConfiguration();
|
||||
assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
|
||||
"spring-snapshot", "spring-milestone", "active-by-default");
|
||||
"spring-snapshot", "spring-milestone", "active-by-default",
|
||||
"spring-ext-release");
|
||||
}, "user.home:src/test/resources/maven-settings/active-profile-repositories");
|
||||
}
|
||||
|
||||
@ -70,7 +72,8 @@ public class RepositoryConfigurationFactoryTests {
|
||||
List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
|
||||
.createDefaultRepositoryConfiguration();
|
||||
assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
|
||||
"spring-snapshot", "spring-milestone", "active-by-property");
|
||||
"spring-snapshot", "spring-milestone", "active-by-property",
|
||||
"spring-ext-release");
|
||||
}, "user.home:src/test/resources/maven-settings/active-profile-repositories",
|
||||
"foo:bar");
|
||||
}
|
||||
@ -82,7 +85,7 @@ public class RepositoryConfigurationFactoryTests {
|
||||
.createDefaultRepositoryConfiguration();
|
||||
assertRepositoryConfiguration(repositoryConfiguration, "central", "local",
|
||||
"spring-snapshot", "spring-milestone", "interpolate-releases",
|
||||
"interpolate-snapshots");
|
||||
"interpolate-snapshots", "spring-ext-release");
|
||||
}, "user.home:src/test/resources/maven-settings/active-profile-repositories",
|
||||
"interpolate:true");
|
||||
}
|
||||
|
@ -49,6 +49,10 @@ public class AetherGrapeEngineTests {
|
||||
private final RepositoryConfiguration springMilestones = new RepositoryConfiguration(
|
||||
"spring-milestones", URI.create("https://repo.spring.io/milestone"), false);
|
||||
|
||||
private final RepositoryConfiguration springExtRelease = new RepositoryConfiguration(
|
||||
"spring-milestones", URI.create("https://repo.spring.io/ext-release-local"),
|
||||
false);
|
||||
|
||||
private AetherGrapeEngine createGrapeEngine(
|
||||
RepositoryConfiguration... additionalRepositories) {
|
||||
List<RepositoryConfiguration> repositoryConfigurations = new ArrayList<>();
|
||||
@ -65,7 +69,7 @@ public class AetherGrapeEngineTests {
|
||||
@Test
|
||||
public void dependencyResolution() {
|
||||
Map<String, Object> args = new HashMap<>();
|
||||
createGrapeEngine(this.springMilestones).grab(args,
|
||||
createGrapeEngine(this.springMilestones, this.springExtRelease).grab(args,
|
||||
createDependency("org.springframework", "spring-jdbc", null));
|
||||
assertThat(this.groovyClassLoader.getURLs()).hasSize(5);
|
||||
}
|
||||
@ -130,7 +134,7 @@ public class AetherGrapeEngineTests {
|
||||
GroovyClassLoader customClassLoader = new GroovyClassLoader();
|
||||
args.put("classLoader", customClassLoader);
|
||||
|
||||
createGrapeEngine(this.springMilestones).grab(args,
|
||||
createGrapeEngine(this.springMilestones, this.springExtRelease).grab(args,
|
||||
createDependency("org.springframework", "spring-jdbc", null));
|
||||
|
||||
assertThat(this.groovyClassLoader.getURLs().length).isEqualTo(0);
|
||||
|
Loading…
Reference in New Issue
Block a user