diff --git a/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/SpringBootVersionRepositoriesBuildCustomizer.java b/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/SpringBootVersionRepositoriesBuildCustomizer.java index 2786e168b9..19c996d425 100644 --- a/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/SpringBootVersionRepositoriesBuildCustomizer.java +++ b/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/SpringBootVersionRepositoriesBuildCustomizer.java @@ -54,7 +54,8 @@ public void customize(Build build) { if (!qualifier.equals("RELEASE")) { if (qualifier.contains("SNAPSHOT")) { addSnapshotRepository(build); - }else{ + } + else { addMilestoneRepository(build); } } diff --git a/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/SpringBootVersionRepositoriesBuildCustomizerTests.java b/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/SpringBootVersionRepositoriesBuildCustomizerTests.java index 7631ee7fab..21f39719d6 100644 --- a/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/SpringBootVersionRepositoriesBuildCustomizerTests.java +++ b/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/SpringBootVersionRepositoriesBuildCustomizerTests.java @@ -91,13 +91,9 @@ void addMavenCentralAndNonReleaseWhenUsingSemVerSnapshot() { private void assertNonReleaseRepositories(MavenBuild build) { List repositories = build.repositories().items().collect(Collectors.toList()); - assertThat(repositories).hasSize(3); + assertThat(repositories).hasSize(2); assertThat(repositories.get(0)).isEqualTo(MavenRepository.MAVEN_CENTRAL); - assertThat(repositories.get(1)).hasFieldOrPropertyWithValue("id", "spring-milestones") - .hasFieldOrPropertyWithValue("name", "Spring Milestones") - .hasFieldOrPropertyWithValue("url", "https://repo.spring.io/milestone") - .hasFieldOrPropertyWithValue("snapshotsEnabled", false); - assertThat(repositories.get(2)).hasFieldOrPropertyWithValue("id", "spring-snapshots") + assertThat(repositories.get(1)).hasFieldOrPropertyWithValue("id", "spring-snapshots") .hasFieldOrPropertyWithValue("name", "Spring Snapshots") .hasFieldOrPropertyWithValue("url", "https://repo.spring.io/snapshot") .hasFieldOrPropertyWithValue("snapshotsEnabled", true);