Migrate to Spring Boot 4
Migrates a jEAP application to Spring Boot 4.
Usage
Navigate to the root directory of your jEAP project and run:
jeap migrate spring-boot-4
What It Does
The migration performs the following steps in order:
-
Update Maven Wrapper — updates the Maven Wrapper (
.mvn/wrapper/maven-wrapper.properties) to the Maven version expected by updated maven plugins so that all subsequent Maven-based steps run with the correct Maven version (skipped automatically if the project does not use the Maven Wrapper) -
Prepare pom.xml for Spring Boot 4 parent upgrade — prepares all
pom.xmlfiles before the parent version switch. This step:- Sets the jEAP parent version in the root
pom.xmlto the pinned Spring Boot 4 baseline (jeap-spring-boot-parent40.5.0 orjeap-internal-spring-boot-parent9.1.0, depending on which is used) - Adds explicit
<dependencyManagement>entries for dependencies that are no longer managed by the new parent BOMs - Renames or replaces dependencies whose artifact coordinates changed in Spring Boot 4
- Sets the jEAP parent version in the root
-
Update jEAP Parent — updates the jEAP parent POM to the latest stable version using Maven's versions plugin. If version resolution fails, the migration continues with the pinned Spring Boot 4 baseline.
-
Update jEAP Dependencies — updates all jEAP dependency versions to the latest releases. Only dependencies with an explicitly declared version in the project are updated — dependencies managed by the parent POM are not affected.
-
Run jEAP OpenRewrite Spring Boot 4 Recipe to automatically migrate Spring Boot application code, configuration, and dependencies
-
Replace secrets location prefix in Spring properties — replaces
aws-secretsmanager:withjeap-aws-secretsmanager:in all Springapplication.yml/application.propertiesfiles -
Format migrated code — runs the project's configured Spotless or git-code-format plugin when available
-
Remove redundant Spring Cloud dependency management — removes an explicit
spring-cloud-dependenciesimport because it is managed by the jEAP Spring Boot 4 parent -
Verify the build — builds the project with
install(using./mvnwif present, otherwisemvn) when all previous steps succeeded. A failing build fails the migration.
Prerequisites
- The project must be a Maven-based jEAP application
- A JDK matching the project's Java version, Maven or the project's Maven Wrapper, and git on the host