fixes #35; updating spring-boot-dependencies
This commit is contained in:
@@ -21,6 +21,7 @@ package org.springframework.cloud.release.internal.pom;
|
||||
*/
|
||||
final class SpringCloudConstants {
|
||||
static final String BOOT_STARTER_ARTIFACT_ID = "spring-boot-starter-parent";
|
||||
static final String BOOT_DEPENDENCIES_ARTIFACT_ID = "spring-boot-dependencies";
|
||||
static final String CLOUD_DEPENDENCIES_ARTIFACT_ID = "spring-cloud-dependencies-parent";
|
||||
static final String BUILD_ARTIFACT_ID = "spring-cloud-build";
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.BOOT_DEPENDENCIES_ARTIFACT_ID;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.BOOT_STARTER_ARTIFACT_ID;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.BUILD_ARTIFACT_ID;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.CLOUD_DEPENDENCIES_ARTIFACT_ID;
|
||||
@@ -42,6 +43,7 @@ class Versions {
|
||||
this.bootVersion = bootVersion;
|
||||
this.projects.add(new Project(SPRING_BOOT_PROJECT_NAME, bootVersion));
|
||||
this.projects.add(new Project(BOOT_STARTER_ARTIFACT_ID, bootVersion));
|
||||
this.projects.add(new Project(BOOT_DEPENDENCIES_ARTIFACT_ID, bootVersion));
|
||||
}
|
||||
|
||||
Versions(String scBuildVersion, Set<Project> projects) {
|
||||
@@ -56,6 +58,7 @@ class Versions {
|
||||
this.scBuildVersion = scBuildVersion;
|
||||
this.projects.add(new Project(SPRING_BOOT_PROJECT_NAME, bootVersion));
|
||||
this.projects.add(new Project(BOOT_STARTER_ARTIFACT_ID, bootVersion));
|
||||
this.projects.add(new Project(BOOT_DEPENDENCIES_ARTIFACT_ID, bootVersion));
|
||||
this.projects.add(new Project(BUILD_ARTIFACT_ID, scBuildVersion));
|
||||
this.projects.add(new Project(CLOUD_DEPENDENCIES_ARTIFACT_ID, scBuildVersion));
|
||||
this.projects.addAll(projects);
|
||||
@@ -114,11 +117,14 @@ class Versions {
|
||||
switch (projectName) {
|
||||
case SPRING_BOOT_PROJECT_NAME:
|
||||
case BOOT_STARTER_ARTIFACT_ID:
|
||||
case BOOT_DEPENDENCIES_ARTIFACT_ID:
|
||||
this.bootVersion = version;
|
||||
remove(SPRING_BOOT_PROJECT_NAME);
|
||||
remove(BOOT_DEPENDENCIES_ARTIFACT_ID);
|
||||
remove(BOOT_STARTER_ARTIFACT_ID);
|
||||
this.projects.add(new Project(SPRING_BOOT_PROJECT_NAME, version));
|
||||
this.projects.add(new Project(BOOT_STARTER_ARTIFACT_ID, version));
|
||||
this.projects.add(new Project(BOOT_DEPENDENCIES_ARTIFACT_ID, version));
|
||||
break;
|
||||
case BUILD_ARTIFACT_ID:
|
||||
case CLOUD_DEPENDENCIES_ARTIFACT_ID:
|
||||
|
||||
@@ -36,7 +36,8 @@ public class VersionsTests {
|
||||
then(new Versions("1.2.3.RELEASE").projects)
|
||||
.contains(
|
||||
new Project("spring-boot", "1.2.3.RELEASE"),
|
||||
new Project("spring-boot-starter-parent", "1.2.3.RELEASE")
|
||||
new Project("spring-boot-starter-parent", "1.2.3.RELEASE"),
|
||||
new Project("spring-boot-dependencies", "1.2.3.RELEASE")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -96,11 +97,19 @@ public class VersionsTests {
|
||||
|
||||
then(versions.versionForProject("spring-boot")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-boot-starter-parent")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-boot-dependencies")).isEqualTo("3.0.0");
|
||||
|
||||
versions = mixedVersions().setVersion("spring-boot-starter-parent", "3.0.0");
|
||||
|
||||
then(versions.versionForProject("spring-boot")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-boot-starter-parent")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-boot-dependencies")).isEqualTo("3.0.0");
|
||||
|
||||
versions = mixedVersions().setVersion("spring-boot-dependencies", "3.0.0");
|
||||
|
||||
then(versions.versionForProject("spring-boot")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-boot-starter-parent")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-boot-dependencies")).isEqualTo("3.0.0");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user