Skip to content

Commit c7b2c61

Browse files
committed
feat: Add report section "Other Removals"
1 parent 43679bb commit c7b2c61

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed

components/sbm-recipes-boot-upgrade/src/main/resources/recipes/27_30/report/sbu30-report.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,45 @@
15971597
# - Your Name[@your-gh-handle]
15981598

15991599

1600+
#
1601+
# Generated from https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#other-removals
1602+
#
1603+
- title: "Other Removals"
1604+
helper:
1605+
type: org.springframework.sbm.boot.upgrade_27_30.report.helper.ConditionOnlyHelper
1606+
condition:
1607+
type: org.springframework.sbm.build.migration.conditions.AnyEffectiveDependencyExistMatchingRegex
1608+
dependencies:
1609+
- 'org\.springframework\.boot\:spring-boot-starter\:.*'
1610+
1611+
change: |-
1612+
Support for the following dependencies has been removed in Spring Boot 3.0:
1613+
1614+
* Apache ActiveMQ
1615+
* Atomikos
1616+
* EhCache 2
1617+
* Hazelcast 3
1618+
1619+
Support for Apache Solr has been removed as its Jetty-based client, `Http2SolrClient`, is not compatible with Jetty 11.
1620+
1621+
affected: |-
1622+
Actually, we don't know if the scanned application is really affected by this change.
1623+
But we found a dependency matching regex `org\.springframework\.boot\:spring-boot-starter\:.*`.
1624+
This indicates that the scanned application might be affected.
1625+
remediation:
1626+
description: |-
1627+
[IMPORTANT]
1628+
====
1629+
This section has been automatically generated from the https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#other-removals[Spring Boot 3.0 Migration Guide^, role="ext-link"]. +
1630+
**Please consider contributing to issue https://github.com/spring-projects-experimental/spring-boot-migrator/issues/686[#686^, role="ext-link"]**
1631+
====
1632+
projects:
1633+
- spring-boot
1634+
gitHubIssue: 686
1635+
# contributors:
1636+
# - Your Name[@your-gh-handle]
1637+
1638+
16001639
footer: |-
16011640
We want to say thank you to all Contributors:
16021641
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
* Copyright 2021 - 2022 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.springframework.sbm.boot.upgrade_27_30.report.helper;
17+
18+
import org.junit.jupiter.api.Test;
19+
import org.junit.jupiter.api.DisplayName;
20+
import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportTestSupport;
21+
import org.springframework.sbm.engine.context.ProjectContext;
22+
import org.springframework.sbm.project.resource.TestProjectContext;
23+
24+
class OtherRemovalsReportSectionTest {
25+
@Test
26+
@DisplayName("Other Removals should render")
27+
void withSingleModuleApplicationShouldRender() {
28+
ProjectContext context = TestProjectContext
29+
.buildProjectContext()
30+
.withSpringBootParentOf("2.7.5")
31+
.withBuildFileHavingDependencies("org.springframework.boot:spring-boot-starter:3.0.0")
32+
.build();
33+
34+
SpringBootUpgradeReportTestSupport.generatedSection("Other Removals")
35+
.fromProjectContext(context)
36+
.shouldRenderAs("""
37+
=== Other Removals
38+
39+
==== What Changed
40+
Support for the following dependencies has been removed in Spring Boot 3.0:
41+
42+
* Apache ActiveMQ
43+
* Atomikos
44+
* EhCache 2
45+
* Hazelcast 3
46+
47+
Support for Apache Solr has been removed as its Jetty-based client, `Http2SolrClient`, is not compatible with Jetty 11.
48+
49+
==== Why is the application affected
50+
Actually, we don't know if the scanned application is really affected by this change.
51+
But we found a dependency matching regex `org\\.springframework\\.boot\\:spring-boot-starter\\:.*`.
52+
This indicates that the scanned application might be affected.
53+
54+
==== Remediation
55+
[IMPORTANT]
56+
====
57+
This section has been automatically generated from the https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#other-removals[Spring Boot 3.0 Migration Guide^, role="ext-link"]. +
58+
**Please consider contributing to issue https://github.com/spring-projects-experimental/spring-boot-migrator/issues/686[#686^, role="ext-link"]**
59+
====
60+
61+
62+
""");
63+
}
64+
65+
@Test
66+
@DisplayName("Other Removals should not render")
67+
void shouldNotRender() {
68+
ProjectContext context = TestProjectContext
69+
.buildProjectContext()
70+
.build();
71+
72+
SpringBootUpgradeReportTestSupport.generatedSection("Other Removals")
73+
.fromProjectContext(context)
74+
.shouldNotRender();
75+
}
76+
}

0 commit comments

Comments
 (0)