Migrate from Micronaut 4.x to 5.x

Apache 2.0

This recipe will apply changes required for migrating from Micronaut 4 to Micronaut 5. Micronaut 5 raises the Java baseline to 25 and ships a number of artifact/plugin renames; see the upstream migration guide for the full list of breaking changes.

org.openrewrite.java.micronaut.Micronaut4to5Migration
mod run . --recipe=org.openrewrite.java.micronaut.Micronaut4to5Migration

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Migrate from Micronaut 3.x to 4.x
  2. Upgrade Java version 25
  3. Update Gradle wrapper 9.5.x-bin
  4. Upgrade micronaut.version Maven property 5.x
  5. Upgrade gradle.properties Micronaut version 5.x
  6. Change Maven parent null:null:5.x
  7. Update Micronaut Gradle build plugins to 5.x
  8. Change Gradle or Maven dependency io.micronaut.security:micronaut-security-annotations
  9. Change Gradle or Maven dependency io.micronaut.eclipsestore:micronaut-eclipsestore-annotations
  10. Change type TurboView to TurboStreamView
  11. Add Gradle or Maven dependency io.micronaut.views:micronaut-views-turbo
  12. Change Gradle or Maven dependency org.testcontainers:junit-jupiter
  13. Migrates from Jackson 2.x to Jackson 3.x
  14. Migrate to JSpecify