Troubleshooting Spring App Advisor Upgrade Failures in Multi-Module Maven Projects and Undertow Compatibility in Spring Boot 4
search cancel

Troubleshooting Spring App Advisor Upgrade Failures in Multi-Module Maven Projects and Undertow Compatibility in Spring Boot 4

book

Article ID: 449285

calendar_today

Updated On:

Products

VMware Tanzu Application Platform VMware Tanzu Spring Runtime - SM VMware Tanzu Spring Runtime VMware Tanzu Platform Spring Essentials VMware Tanzu Spring Essentials VMware Tanzu Platform Spring

Issue/Introduction

During a Spring Boot 4.x upgrade using Spring App Advisor, customers have reported encountering two primary issues:

  1. Undertow Support: The Advisor does not automatically map or suggest upgrades for applications using the Undertow web server.
  2. Maven Resolution Failures: In multi-module Maven projects using a Parent POM or BOM, the Advisor may fail to apply changes, or it may add unexpected explicit/milestone versions (e.g., 4.1.0-M4) instead of maintaining BOM-managed versions.

Environment

  • Product: VMware Tanzu Spring App Advisor 1.6.x
  • Framework: Spring Boot 3.x to 4.x Upgrade
  • Build Tool: Maven (Multi-module architecture)

Cause

1. Undertow Compatibility

Spring Boot 4 requires a Servlet 6.1 baseline. Undertow is currently not compatible with this baseline, and as a result, App Advisor does not include native upgrade mappings for Undertow.

2. Maven Context Resolution

  • BOM Isolation: If a project uses a dependencyManagement block for BOM isolation without a "signature" Spring Boot artifact (like spring-boot-starter), the Advisor may misidentify the project as a standard Spring Framework project, failing to trigger the Boot upgrade logic.
  • Legacy Properties: Custom version properties (e.g., jackson.version) or BOM overrides carried over from Spring Boot 3.x can interfere with the Advisor's ability to resolve the target 4.x dependency graph, causing it to fall back to the absolute latest version from Maven Central.

Resolution

For Undertow Applications

Native support is not currently available. To proceed:

  • Custom Recipes: Organizations must define custom OpenRewrite recipes to handle Undertow-specific mappings.
  • Manual Override: Manually align Undertow dependencies to the target Spring Boot 4 baseline once a compatible Undertow version is released.

For Multi-Module Maven Projects

  1. Verify Signature Artifacts: Ensure the project includes a core Spring Boot dependency (e.g., org.springframework.boot:spring-boot) to assist the Advisor's scanner in detecting the framework.
  2. Clean Up Legacy Properties: Before running the Advisor, remove or correct any custom version properties in the pom.xml that were specific to the Spring Boot 3.x line.
  3. Inspect BOM Management: Ensure the Spring Boot BOM is correctly declared in the Parent POM and that child modules are not overriding managed versions with explicit declarations.

Additional Information