Skip to content

Commit ca71660

Browse files
committed
Adjust integration tests to use Boot 3
1 parent 6abb1e0 commit ca71660

File tree

4 files changed

+10
-55
lines changed

4 files changed

+10
-55
lines changed

applications/spring-shell/src/test/java/org/springframework/sbm/BootUpgrade_27_30_ManuallyManaged_IntegrationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ void migrateManuallyManagedApplication() {
5151
buildProject();
5252

5353
Xml.Document rootBuildFile = getRootBuildFile();
54-
verifyManagedDependency(rootBuildFile, "spring-boot-starter-test", "3.0.0-M3");
55-
verifyManagedDependency(rootBuildFile, "metrics-annotation", "4.2.9");
54+
verifyManagedDependency(rootBuildFile, "spring-boot-starter-test", "3.0.0");
55+
verifyManagedDependency(rootBuildFile, "metrics-annotation", "4.2.13");
5656

5757
Xml.Document applicationBuildFile = getApplicationBuildFile();
58-
verifyProperty(applicationBuildFile, "spring-boot-starter-web.version", "3.0.0-M3");
59-
verifyDependencyWithClassifier(applicationBuildFile, "ehcache", "3.10.0", "jakarta");
58+
verifyProperty(applicationBuildFile, "spring-boot-starter-web.version", "3.0.0");
59+
verifyDependencyWithClassifier(applicationBuildFile, "ehcache", "3.10.8", "jakarta");
6060

6161
verifyConstructorBindingRemoval();
6262
}

applications/spring-shell/src/test/java/org/springframework/sbm/BootUpgrade_27_30_MultiModule_IntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private void verifyParentPomVersion() {
221221
String groupId = parentTag.getChildValue("groupId").get();
222222
String artifactId = parentTag.getChildValue("artifactId").get();
223223

224-
assertThat(version).isEqualTo("3.0.0-M3");
224+
assertThat(version).isEqualTo("3.0.0");
225225
assertThat(groupId).isEqualTo("org.springframework.boot");
226226
assertThat(artifactId).isEqualTo("spring-boot-starter-parent");
227227
}

applications/spring-shell/src/test/resources/testcode/boot-migration-27-30-manual-managed/pom.xml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,6 @@
1616
<java.version>17</java.version>
1717
</properties>
1818

19-
<repositories>
20-
<repository>
21-
<id>spring-snapshot</id>
22-
<url>https://repo.spring.io/snapshot</url>
23-
<releases>
24-
<enabled>false</enabled>
25-
</releases>
26-
</repository>
27-
<repository>
28-
<id>spring-milestone</id>
29-
<url>https://repo.spring.io/milestone</url>
30-
<snapshots>
31-
<enabled>false</enabled>
32-
</snapshots>
33-
</repository>
34-
<repository>
35-
<id>spring-release</id>
36-
<url>https://repo.spring.io/release</url>
37-
<snapshots>
38-
<enabled>false</enabled>
39-
</snapshots>
40-
</repository>
41-
</repositories>
42-
4319
<dependencyManagement>
4420
<dependencies>
4521
<dependency>

components/sbm-recipes-boot-upgrade/src/main/resources/recipes/boot-2.7-3.0-dependency-version-update.yaml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: boot-2.7-3.0-dependency-version-update
2-
description: Bump spring-boot-starter-parent from 2.7.x to 3.0.0-M3
2+
description: Bump spring-boot-starter-parent from 2.7.x to 3.0.0
33
condition:
44
type: org.springframework.sbm.boot.common.conditions.IsSpringBootProject
55
versionPattern: "2\\.7\\..*|3\\.0\\..*"
@@ -10,27 +10,6 @@
1010
condition:
1111
type: org.springframework.sbm.common.migration.conditions.TrueCondition
1212

13-
# TODO: upgrades for 2.7
14-
- type: org.springframework.sbm.build.migration.actions.AddRepositoryAction
15-
description: Add Spring Boot milestone repository.
16-
id: "spring-milestone"
17-
url: "https://repo.spring.io/milestone"
18-
snapshotsEnabled: false
19-
condition:
20-
type: org.springframework.sbm.build.migration.conditions.NoRepositoryExistsCondition
21-
id: "spring-milestone"
22-
url: "https://repo.spring.io/milestone"
23-
24-
- type: org.springframework.sbm.build.migration.actions.AddPluginRepositoryAction
25-
description: Add Spring Boot milestone plugin repository.
26-
id: "spring-milestone"
27-
url: "https://repo.spring.io/milestone"
28-
snapshotsEnabled: false
29-
condition:
30-
type: org.springframework.sbm.build.migration.conditions.NoPluginRepositoryExistsCondition
31-
id: "spring-milestone"
32-
url: "https://repo.spring.io/milestone"
33-
3413
- type: org.springframework.sbm.engine.recipe.OpenRewriteDeclarativeRecipeAdapter
3514
condition:
3615
type: org.springframework.sbm.boot.common.conditions.IsSpringBootProject
@@ -61,7 +40,7 @@
6140
condition:
6241
type: org.springframework.sbm.boot.common.conditions.IsSpringBootProject
6342
versionPattern: "2\\.7\\..*|3\\.0\\..*"
64-
description: Add Spring Milestone Repository and bump SpringBoot to 3.0.0-M3
43+
description: Add Spring Milestone Repository and bump SpringBoot to 3.0.0
6544
openRewriteRecipe: |-
6645
type: specs.openrewrite.org/v1beta/recipe
6746
name: org.openrewrite.java.spring.boot3.data.UpgradeSpringData30
@@ -70,7 +49,7 @@
7049
recipeList:
7150
- org.openrewrite.maven.spring.UpgradeUnmanagedSpringProject:
7251
versionPattern: "2\\.7\\..*"
73-
newVersion: 3.0.0-M3
52+
newVersion: 3.0.0
7453
- org.openrewrite.maven.ChangeDependencyClassifier:
7554
groupId: org.ehcache
7655
artifactId: ehcache
@@ -81,11 +60,11 @@
8160
- org.openrewrite.maven.UpgradeParentVersion:
8261
groupId: org.springframework.boot
8362
artifactId: spring-boot-starter-parent
84-
newVersion: 3.0.0-M3
63+
newVersion: 3.0.0
8564
- org.openrewrite.maven.UpgradeDependencyVersion:
8665
groupId: org.springframework.boot
8766
artifactId: spring-boot-dependencies
88-
newVersion: 3.0.0-M3
67+
newVersion: 3.0.0
8968
- type: org.springframework.sbm.engine.recipe.OpenRewriteDeclarativeRecipeAdapter
9069
condition:
9170
type: org.springframework.sbm.boot.common.conditions.IsSpringBootProject

0 commit comments

Comments
 (0)