Polish "Do not add snapshot repo unless absolutely necessary"

See gh-960
This commit is contained in:
Stephane Nicoll
2019-07-25 12:20:15 +02:00
parent c54ec295bf
commit a92c791c32
2 changed files with 21 additions and 13 deletions

View File

@@ -65,14 +65,14 @@ class SpringBootVersionRepositoriesBuildCustomizerTests {
List<MavenRepository> repositories = build.repositories().items().collect(Collectors.toList());
assertThat(repositories).hasSize(3);
assertThat(repositories.get(0)).isEqualTo(MavenRepository.MAVEN_CENTRAL);
assertThat(repositories.get(1)).hasFieldOrPropertyWithValue("id", "spring-snapshots")
.hasFieldOrPropertyWithValue("name", "Spring Snapshots")
.hasFieldOrPropertyWithValue("url", "https://repo.spring.io/snapshot")
.hasFieldOrPropertyWithValue("snapshotsEnabled", true);
assertThat(repositories.get(2)).hasFieldOrPropertyWithValue("id", "spring-milestones")
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")
.hasFieldOrPropertyWithValue("name", "Spring Snapshots")
.hasFieldOrPropertyWithValue("url", "https://repo.spring.io/snapshot")
.hasFieldOrPropertyWithValue("snapshotsEnabled", true);
}
private void assertMavenCentralAndMilestonesRepositories(MavenBuild build) {