Skip to main content

8.86.0 release (2026-07-01)

Total recipe count: 4455

info

This changelog only shows what recipes have been added, removed, or changed. OpenRewrite may do releases that do not include these types of changes. To see these changes, please go to the releases page.

Corresponding CLI version

  • CLI version 4.3.7

New Recipes

  • org.axonframework.migration.UpgradeAxonFramework_4_Jakarta: Migration file to upgrade from an Axon Framework Javax-specific project to Jakarta.
  • org.axonframework.migration.UpgradeAxonFramework_4_Javax: Migration file to upgrade an Axon Framework Javax-specific project and remain on Javax.
  • org.openrewrite.featureflags.launchdarkly.MarkIncompatibleEvaluationDetailAccessors: OpenFeature's FlagEvaluationDetails does not offer a direct replacement for every EvaluationDetail accessor. Add a TODO comment on getVariationIndex(), isDefaultValue() and getReason() calls so they are migrated by hand, since getVariationIndex() and isDefaultValue() have no equivalent and getReason() returns a String rather than an EvaluationReason.
  • org.openrewrite.featureflags.launchdarkly.MigrateLDClientLifecycle: Migrate LDClient lifecycle calls: close() becomes OpenFeatureAPI.getInstance().shutdown() and isInitialized() becomes OpenFeatureAPI.getInstance().getClient().getProviderState() == ProviderState.READY. OpenFeature manages provider state globally rather than per client instance, so the original receiver is dropped.
  • org.openrewrite.featureflags.launchdarkly.MigrateLDClientToOpenFeature: Replace new LDClient(...) with OpenFeatureAPI.getInstance().getClient(). When the client is assigned to a local variable, the one-time provider bootstrap OpenFeatureAPI.getInstance().setProviderAndWait(new Provider(...)) is generated from the original SDK key and configuration. In other positions (such as fields) the original configuration is preserved in a TODO comment instead, as a statement cannot be inserted there.
  • org.openrewrite.featureflags.launchdarkly.MigrateLDContextToEvaluationContext: Convert LDContext.create(...) and LDContext.builder(...) construction to OpenFeature's MutableContext, mapping name(...) and set(...) attributes to add(...) and dropping the terminal build() call. Targeting kind, multi-context and private attributes are left untouched for manual review.
  • org.openrewrite.featureflags.launchdarkly.MigrateLDValueToValue: Migrate jsonValueVariation/jsonValueVariationDetail to OpenFeature's getObjectValue/getObjectDetails (reordering the context argument to last) and convert scalar LDValue.of(...) and LDValue.ofNull() defaults to dev.openfeature.sdk.Value. To keep the result compilable, this recipe is skipped for files that use the structured builders LDValue.buildObject(), LDValue.buildArray(), LDValue.parse(...) or LDValue.of(long), which require manual migration to Structure/List<Value>.
  • org.openrewrite.featureflags.launchdarkly.MigrateLaunchDarklyToOpenFeature: Migrate call sites from the LaunchDarkly server SDK to the vendor-neutral OpenFeature API, backed by the LaunchDarkly OpenFeature provider. Flag evaluations are renamed and their arguments reordered (LaunchDarkly takes the context as the second argument; OpenFeature takes it last), LDContext construction becomes MutableContext, and LDClient becomes dev.openfeature.sdk.Client. The one-time provider bootstrap (OpenFeatureAPI.setProviderAndWait(...)) is intentionally left for manual configuration.
  • org.openrewrite.github.UpgradeOfficialGitHubActions: Upgrades actions from the official actions and github organizations to the newest known version, working entirely offline. Each reference is upgraded while preserving its existing precision: a major version (v4) moves to the newest major, a full version (v4.1.2) to the newest full version, and a commit SHA to the latest known commit. Actions that are not official, not known, or already up to date are left untouched.
  • org.openrewrite.java.jackson.JsonSerializeIncludeToJsonInclude: Move the deprecated include attribute of FasterXML's @JsonSerialize to a separate @JsonInclude annotation. The include attribute was deprecated in Jackson 2.x and removed in Jackson 3.x; running this recipe before the Jackson 2 → 3 package rename produces a correct tools.jackson.annotation.JsonInclude on the Jackson 3 side.
  • org.openrewrite.java.jackson.ReadValueUrlToOpenStream: Jackson 3.x removed every URL-accepting readValue overload from ObjectMapper. Rewrite call sites to feed URL.openStream() into the surviving readValue(InputStream, ...) overload, which is what readValue(URL, ...) did internally in Jackson 2.x. The caller's checked-exception story is unchanged: URL.openStream() declares IOException, the same checked exception the removed readValue(URL, ...) declared.
  • org.openrewrite.java.migrate.CommentJava24KotlinCap: Adds an explanatory comment to Maven pom.xml files in modules that were held at Java 24 because they compile Kotlin and depend on kotlin-stdlib older than 2.3, which cannot target Java 25 bytecode. The comment names the kotlin-stdlib version found and the next step needed to reach Java 25. Self-healing: the comment is added while the module is at Java 24 and removed again once the module reaches a higher Java version (for instance after its Kotlin was upgraded to 2.3), so it only ever remains on modules that truly stay at Java 24 — whether a Kotlin 1.x cap or a 2.0-2.2 module whose Kotlin upgrade could not be applied. Intended to run last, scoped to modules that compile Kotlin.
  • org.openrewrite.java.migrate.CommentKotlinModulesCappedAtJava24: Adds an explanatory comment to Kotlin modules that remain at Java 24 after the Java 25 migration, because Kotlin before 2.3 cannot target Java 25 bytecode. This covers both a Kotlin 1.x cap (which cannot be upgraded automatically) and a Kotlin 2.0-2.2 module whose upgrade to 2.3 could not be applied. Scoped to modules that actually compile Kotlin (i.e. contain .kt source files); the comment is self-healing, so a module that does reach Java 25 has it removed.
  • org.openrewrite.java.migrate.UpgradeBuildToJava24ForKotlin1x: Kotlin versions before 2.3 only support up to Java 24, and Kotlin 1.x cannot be safely upgraded automatically because crossing the K2 compiler default introduced in Kotlin 2.0 is a source-breaking change. Such modules are therefore capped at Java 24 and annotated with an explanation. Modules already on Kotlin 2.0-2.2 are instead bumped to Kotlin 2.3 by UpgradeKotlinForJava25 so they can reach Java 25. Applies only to modules that actually compile Kotlin (i.e. contain .kt source files), so transitive kotlin-stdlib dependencies do not trigger the cap.
  • org.openrewrite.java.migrate.UpgradeKotlinForJava25: Only Kotlin 2.3 and later can target Java 25 bytecode, so modules on an older Kotlin are otherwise capped at Java 24. This recipe upgrades modules that compile Kotlin (i.e. contain .kt source files) and are already on Kotlin 2.0, 2.1, or 2.2 up to the latest Kotlin 2.3, so they can subsequently be migrated to Java 25. Modules on Kotlin 1.x are left untouched, as crossing the K2 compiler default introduced in Kotlin 2.0 is a source-breaking change that should not be applied automatically. As a safety net the module is also floored at Java 24: if the Kotlin upgrade cannot be applied (for instance because the version is managed externally by a parent or BOM), the module still lands on Java 24 rather than being left behind, and is raised the rest of the way to Java 25 only once it actually reaches Kotlin 2.3.
  • org.openrewrite.java.migrate.jakarta.MigratePluginsForJakarta11: Update plugins to be compatible with Jakarta EE 11.
  • org.openrewrite.java.migrate.jakarta.MigratePluginsForJakarta9: Update plugins to be compatible with Jakarta EE 9.
  • org.openrewrite.java.migrate.jakarta.ReplaceJakartaJwsWithJakartaXmlWs: Starting with Jakarta EE 10, the standalone jakarta.jws-api artifact was retired and its content was merged into jakarta.xml.ws-api. This recipe replaces a declared jakarta.jws:jakarta.jws-api dependency in place with jakarta.xml.ws:jakarta.xml.ws-api, and adds jakarta.xml.ws:jakarta.xml.ws-api directly when jakarta.jws was only available transitively.
  • org.openrewrite.java.migrate.jakarta.UpgradeMavenEjbPluginConfiguration: Updates the <ejbVersion> configuration of maven-ejb-plugin to 4.0 when the current value (or its resolved Maven property) indicates EJB 3.x. Handles the common pattern where <ejbVersion> is coupled to the javax.ejb-api dependency version via a shared property, decoupling them after migration.
  • org.openrewrite.java.migrate.lang.ExtractExplicitConstructorInvocationArguments: JEP 513 allows statements before an explicit super(..) or this(..) constructor invocation. When such a call computes one of its arguments through a method invocation or object creation, this recipe extracts the non-trivial arguments into local variables declared right before the call, surfacing the work done before construction.

This is a strictly behavior-preserving transformation: argument expressions are already evaluated before the delegate constructor body runs, and such an argument can never reference the instance under construction, so hoisting them into preceding statements changes neither the order of side effects nor the set of legal references. Arguments are extracted in their original left-to-right order, and trivial arguments (literals and local variable references, which have no side effects) are left in place. Statements that follow the constructor invocation are deliberately not moved, as reordering them relative to the delegate constructor's side effects could change behavior.

Removed Recipes

  • io.axoniq.framework.migration.Axon4ToAxoniq5AxonServerConnector: Relocates the Axon Server connector from org.axonframework.axonserver.connector to io.axoniq.framework.axonserver.connector. The connector now lives in the Axoniq commercial offering (io.axoniq.framework:axon-server-connector). Class names are mostly preserved.
  • io.axoniq.framework.migration.Axon4ToAxoniq5Bom: Replaces the imported org.axonframework:axon-bom (AF4) or org.axonframework:axon-framework-bom (free AF5) in <dependencyManagement> with the Axoniq Framework 5 commercial BOM io.axoniq.framework:axoniq-framework-bom.
  • io.axoniq.framework.migration.Axon4ToAxoniq5DeadLetter: Relocates the Sequenced Dead-Letter Queue (DLQ) types from the open-source axon-messaging module to the Axoniq commercial axoniq-dead-letter module (io.axoniq.framework:axoniq-dead-letter). Class names — including SequencedDeadLetterQueue, JpaSequencedDeadLetterQueue, JdbcSequencedDeadLetterQueue, DeadLetteredEventProcessingTask, EnqueuePolicy, Decisions, ThrowableCause — are preserved.
  • io.axoniq.framework.migration.Axon4ToAxoniq5DistributedMessaging: Relocates the distributed command-bus components (DistributedCommandBus, CommandBusConnector) from the AF4 open-source axon-messaging module into the Axoniq commercial axoniq-distributed-messaging module (io.axoniq.framework.messaging.commandhandling.distributed). Each AF4 fully-qualified name is mapped directly to its final Axoniq location, so this recipe is order-independent relative to the open-source messaging package rename.
  • io.axoniq.framework.migration.Axon4ToAxoniq5EventStreaming: Placeholder. The Axoniq event streaming module (io.axoniq.framework:axoniq-event-streaming) consolidates multi-stream event consumption that lived in MultiStreamableMessageSource (available since Axon Framework 4.2) into a dedicated module in Axoniq Framework 5. AF4 applications using MultiStreamableMessageSource should migrate to axoniq-event-streaming once they adopt Axoniq Framework 5; this recipe will gain class-level mappings as that migration becomes deterministic.
  • io.axoniq.framework.migration.Axon4ToAxoniq5SpringBoot: Swaps the Spring Boot starter dependency to the Axoniq commercial variant (io.axoniq.framework:axoniq-spring-boot-starter). Accepts both the AF4 raw coordinate (org.axonframework:axon-spring-boot-starter) and the post-Axon4ToAxon5SpringBootExtension coordinate (org.axonframework.extensions.spring:axon-spring-boot-starter). Class-level mappings for the Axoniq autoconfig package io.axoniq.framework.springboot.* are not yet implemented.
  • io.axoniq.framework.migration.Axon4ToAxoniq5Testcontainer: Relocates the Axon Server Testcontainer types from the AF4 axon-test package org.axonframework.test.server to the dedicated Axoniq commercial artifact io.axoniq.framework:axoniq-testcontainer under io.axoniq.framework.testcontainer. The Enterprise (AxonServerEEContainer) and Standard (AxonServerSEContainer) edition variants both collapse into the unified AxonServerContainer in Axoniq 5.
  • io.axoniq.framework.migration.UpgradeAxon4ToAxoniq5: Migrates an Axon Framework 4.x application to Axoniq Framework 5 (commercial). Composes UpgradeAxon4ToAxon5 (the free leg) and then layers commercial-only migrations: BOM swap to io.axoniq.framework:axoniq-framework-bom, Spring Boot starter swap to io.axoniq.framework:axoniq-spring-boot-starter, source rewrites and Maven adds for Axon Server connector, sequenced dead-letter queue, and distributed messaging.
  • org.axonframework.migration.AddAxonTestFixtureTearDown: Adds an @AfterEach tearDown() method calling stop() on the AxonTestFixture field, when the test class has such a field but no existing @AfterEach method (and no method named tearDown). Pairs with MigrateAggregateTestFixtureSetup which produces the field; the tear-down step was previously left for manual migration. Java sources only.
  • org.axonframework.migration.AddCommandAnnotation: Scans @CommandHandler methods and annotates their command parameter types with @Command. Also migrates @RoutingKey on a field to @Command(routingKey = "fieldName") on the class, removing the @RoutingKey field annotation.
  • org.axonframework.migration.AddEntityCreatorAnnotation: Annotates existing no-arg constructors with @EntityCreator for any class annotated with @EventSourcedEntity or the Spring @EventSourced stereotype. Required by AF5 — the framework uses this annotation to instantiate the entity before applying events. Idempotent: skips constructors that are already annotated.
  • org.axonframework.migration.AddEventAnnotation: Scans @EventSourcingHandler methods and annotates their event parameter types with @Event. Migrates @Revision("x") on the class to @Event(version = "x"), removing the now-obsolete @Revision annotation.
  • org.axonframework.migration.AddEventTagAnnotation: Scans event-sourced entity classes for their @AggregateIdentifier field and the event types used in @EventSourcingHandler methods, then annotates the corresponding field in each event class with @EventTag(key = "<EntitySimpleName>").
  • org.axonframework.migration.AnnotateObsoleteSequencingPolicyProperty: Inserts a one-line # TODO(axon4to5): ... comment above any axon.eventhandling.processors.<group>.sequencing-policy entry in application.properties / application.yml. AF5 moves the decision onto the handler class via @SequencingPolicy; deleting the property here would race the per-construct skill that drives the source-side annotation, so this recipe only annotates. Idempotent.
  • org.axonframework.migration.Axon4ToAxon5AmqpExtension: Placeholder for the AMQP extension migration. The AMQP extension lives at org.axonframework.extensions.amqp in AF4 and does not yet have a finalized Axon Framework 5 equivalent. Update this recipe once the AF5 AMQP integration ships.
  • org.axonframework.migration.Axon4ToAxon5Bom: Renames the imported org.axonframework:axon-bom BOM in <dependencyManagement> to org.axonframework:axon-framework-bom and pins the imported version to the current Axon Framework 5 release. The BOM artifactId changed between Axon Framework 4 and Axon Framework 5; the groupId is unchanged.
  • org.axonframework.migration.Axon4ToAxon5CdiExtension: Placeholder for the CDI extension migration. The extension lives at org.axonframework.extensions.cdi in AF4 and does not yet have a finalized Axon Framework 5 equivalent. Update this recipe once the AF5 CDI integration ships.
  • org.axonframework.migration.Axon4ToAxon5Common: Migrates org.axonframework.config to org.axonframework.common.configuration, renames ConfigurerModule to ConfigurationEnhancer, ModuleConfiguration to Module, LifecycleOperations to LifecycleRegistry, relocates EventProcessingConfigurer under the messaging.eventhandling namespace, and swaps @ProcessingGroup for the AF5 @Namespace annotation.
  • org.axonframework.migration.Axon4ToAxon5Conversion: Migrates the Serializer-based org.axonframework.serialization namespace to the new Converter-based org.axonframework.conversion namespace. Note: this is a package rename; concrete renames such as JacksonSerializer to JacksonConverter are NOT applied here and must be handled separately.
  • org.axonframework.migration.Axon4ToAxon5EventSourcing: Relocates the @EventSourcingHandler annotation into eventsourcing.annotation, relocates Snapshotter into the new eventsourcing.snapshot.api API package, ensures the org.axonframework:axon-eventsourcing dependency is present when the app uses event-sourcing types (the AF5 Spring Boot starter no longer pulls it transitively, so apps not using the BOM need it added explicitly — it transitively brings axon-modelling and axon-messaging), and applies the source-level aggregate→entity rewrites — annotating no-arg constructors with the now-mandatory @EntityCreator and replacing AggregateLifecycle.apply(...) with an injected EventAppender#append(...).
  • org.axonframework.migration.Axon4ToAxon5JGroupsExtension: Placeholder for the JGroups extension migration. The JGroups extension at org.axonframework.extensions.jgroups provided distributed command bus routing in AF4. In Axon Framework 5 the distributed command bus has moved into the AxonIQ commercial offering (io.axoniq.framework:axoniq-distributed-messaging). Code using JGroupsConnector must be replaced with the AxonIQ commercial distributed messaging APIs.
  • org.axonframework.migration.Axon4ToAxon5KafkaExtension: Placeholder for the Kafka extension migration. The Kafka extension lives at org.axonframework.extensions.kafka in AF4 and does not yet have a finalized Axon Framework 5 equivalent. Update this recipe once the AF5 Kafka integration ships.
  • org.axonframework.migration.Axon4ToAxon5Messaging: Migrates the messaging core (command, event, query handling) from org.axonframework.{command,event,query}handling into the org.axonframework.messaging.* namespace, relocates handler & interceptor annotations into their .annotation.* subpackages, renames EventBus to EventSink, fixes MetaData casing to Metadata, relocates the top-level messaging API (Message, Metadata, UnitOfWork, MessageHandlerInterceptor, MessageHandlerInterceptorChain, correlation.*) into messaging.core.*, moves the sequencing policy package out of eventhandling.async into messaging.core.sequencing, relocates tokenstore and the replay/reset annotations under their AF5 subpackages, and moves QueryGateway into its own gateway subpackage.
  • org.axonframework.migration.Axon4ToAxon5MetricsDropwizardExtension: Relocates org.axonframework.metrics to org.axonframework.extension.metrics.dropwizard, reflecting the move from a flat metrics namespace to a per-provider layout under extension.metrics.*.
  • org.axonframework.migration.Axon4ToAxon5MetricsMicrometerExtension: Relocates org.axonframework.micrometer to org.axonframework.extension.metrics.micrometer, reflecting the move into the per-provider extension.metrics.* layout.
  • org.axonframework.migration.Axon4ToAxon5Modelling: Migrates the modelling layer from the aggregate vocabulary to the entity vocabulary: relocates org.axonframework.modelling.command to org.axonframework.modelling.entity, renames TargetAggregateIdentifier to TargetEntityId, AggregateMember to EntityMember, Repository into modelling.repository, and CommandTargetResolver to EntityIdResolver. Strips AF4-only modelling annotations (@AggregateIdentifier, @CreationPolicy) that have no AF5 successor — id resolution moved onto commands via @TargetEntityId, and the AF4 creation-policy semantics map onto static command handlers in AF5 (a manual rewrite the recipe cannot infer beyond removing the annotation itself).
  • org.axonframework.migration.Axon4ToAxon5MongoExtension: Placeholder for the Mongo extension migration. The Mongo extension lives at org.axonframework.extensions.mongo in AF4 and does not yet have a finalized Axon Framework 5 equivalent. Update this recipe once the AF5 Mongo integration ships.
  • org.axonframework.migration.Axon4ToAxon5MultitenancyExtension: Placeholder for the Multitenancy extension migration. The extension lives at org.axonframework.extensions.multitenancy in AF4 and does not yet have a finalized Axon Framework 5 equivalent. Update this recipe once the AF5 multitenancy story ships.
  • org.axonframework.migration.Axon4ToAxon5QueryResponseTypes: On two-argument queryGateway.query(payload, ResponseType) calls, unwraps the AF4 ResponseTypes.instanceOf(...) / optionalInstanceOf(...) / multipleInstancesOf(...) wrapper to the plain Class<R> form AF5 expects, and renames query(payload, multipleInstancesOf(R.class)) to queryMany(payload, R.class). Three-argument query(String, Object, ...) forms, subscriptionQuery(...), and streamingQuery(...) are left untouched so the per-construct migration skill keeps the AF4 fingerprints it needs for design decisions. Removes ResponseType / ResponseTypes imports only when no references remain.
  • org.axonframework.migration.Axon4ToAxon5ReactorExtension: Relocates org.axonframework.extensions.reactor.* to org.axonframework.extension.reactor.* (singular extension) and inserts the messaging. segment in front of the commandhandling, eventhandling, and queryhandling subpackages. The bare extensions.reactor.messaging.* package (which holds ReactorMessageDispatchInterceptor and the interceptor chain) is moved under extension.reactor.messaging.core.*.
  • org.axonframework.migration.Axon4ToAxon5SpringAotExtension: The org.axonframework.extensions.spring-aot:axon-spring-aot extension has no Axon Framework 5 port. Removes the dependency so the project compiles against AF5. Projects that need Spring AOT / native-image support against AF5 must reintroduce equivalent functionality manually — there is no drop-in replacement.
  • org.axonframework.migration.Axon4ToAxon5SpringBootActuatorExtension: Relocates org.axonframework.actuator to org.axonframework.extension.springboot.actuator. The Actuator support is now nested under the Spring Boot extension namespace.
  • org.axonframework.migration.Axon4ToAxon5SpringBootExtension: Relocates org.axonframework.springboot to org.axonframework.extension.springboot, matching the Maven groupId move to org.axonframework.extensions.spring. Covers both the autoconfigure and starter artifacts (apps depend on the starter, which transitively pulls autoconfigure). Also rewrites Spring Boot configuration property keys whose binding class moved or was renamed in AF5.
  • org.axonframework.migration.Axon4ToAxon5SpringCloudExtension: Placeholder for the Spring Cloud extension migration. The Spring Cloud extension at org.axonframework.extensions.springcloud provided distributed command bus routing in AF4. In Axon Framework 5 the distributed command bus has moved into the AxonIQ commercial offering (io.axoniq.framework:axoniq-distributed-messaging). Code using SpringCloudCommandRouter must be replaced with the AxonIQ commercial distributed messaging APIs.
  • org.axonframework.migration.Axon4ToAxon5SpringExtension: Relocates org.axonframework.spring to org.axonframework.extension.spring and renames the Spring stereotype @Aggregate to @EventSourced. The stereotype rename is mapped from both the AF4 location and the post-package- move location, so the recipe is order-independent.
  • org.axonframework.migration.Axon4ToAxon5Test: Renames AggregateTestFixture and SagaTestFixture to the unified AxonTestFixture introduced in Axon Framework 5, and rewrites AF4-style flat fixture call chains (fixture.given(...).when(...).expectEvents(...)) to the AF5 fluent given/when/then API (fixture.given().events(...).when().command(...).then().events(...)). Also generates an @AfterEach tearDown() calling fixture.stop() on test classes that declare an AxonTestFixture field but have no existing @AfterEach. Targets the axon-test Maven artifact. Hamcrest matcher conversions and Kotlin @AfterEach insertion remain manual.
  • org.axonframework.migration.Axon4ToAxon5TracingOpenTelemetryExtension: Placeholder for the OpenTelemetry tracing extension migration. Revisioning of the distributed tracing extension for Axon Framework 5 is slated for a later release (see issue #3594). Update this recipe once the AF5 OpenTelemetry tracing integration ships.
  • org.axonframework.migration.Axon4ToAxon5TracingOpenTracingExtension: Placeholder. The OpenTracing tracing extension at org.axonframework.extensions.tracing is superseded by the OpenTelemetry tracing extension in Axon Framework 5 (see Axon4ToAxon5TracingOpenTelemetryExtension). Code using OpenTracing must be migrated to OpenTelemetry manually.
  • org.axonframework.migration.ConfigureEventSourcedAnnotation: Adds explicit tagKey = "<EntitySimpleName>" and idType = <ResolvedType>.class to @EventSourced annotations that have no tagKey set. The tagKey is derived from the class simple name (matching the AF5 default). The idType is deduced from the type of the field annotated with @AggregateIdentifier in AF4. When that field is absent (e.g. POJO aggregate without an explicit identifier field) the idType falls back to Object.class and is flagged with a TODO(axon4to5): comment.
  • org.axonframework.migration.ConvertCommandHandlerConstructorToCompanionObject: Rewrites Kotlin @CommandHandler constructor(...) declarations into companion object { @JvmStatic @CommandHandler fun handle(...) } on the same class, matching the AF5 contract where @CommandHandler no longer targets constructors. Parameter list and method body are preserved.
  • org.axonframework.migration.ConvertCommandHandlerConstructorToStaticMethod: Rewrites Axon Framework 4 @CommandHandler constructors into public static void handle(...) methods, matching the AF5 contract where @CommandHandler no longer targets constructors. Parameter list and method body are preserved.
  • org.axonframework.migration.MigrateAggregateTestFixtureSetup: Rewrites new AggregateTestFixture<X>(X.class) (the AF4 aggregate-fixture constructor) to AF5's AxonTestFixture.with(EventSourcingConfigurer.create().registerEntity(EventSourcedEntityModule.autodetected(<IdType>.class, X.class))). The aggregate type X is read from the class-literal constructor argument; the id type is looked up via the cross-recipe map populated by AddEventTagAnnotation (while @AggregateIdentifier is still on the source). Only matches the AF4 AggregateTestFixture FQN — SagaTestFixture setups are left for manual migration.
  • org.axonframework.migration.MigrateAxonTestFixtureFluentApi: Rewrites the flat AF4 fixture.given(...).when(...).expectEvents(...) call shape to the AF5 fluent fixture.given().events(...).when().command(...).then().events(...) shape, including the leaf-method renames (expectNoEventsnoEvents, expectSuccessfulHandlerExecutionsuccess, expectException + expectExceptionMessage → single exception(cls, msg), etc.). The fixture setup migration (constructor → AxonTestFixture.with(configurer), @AfterEach stop()) and Hamcrest matcher conversions stay manual.
  • org.axonframework.migration.MigrateCommandGatewayInEventHandler: Inside every @EventHandler method in the class, rewrites calls of the form commandGateway.send(...) / commandGateway.sendAndWait(...) (where commandGateway is a class-level CommandGateway field) to commandDispatcher.send(...) on a method-level CommandDispatcher parameter — adding the parameter when missing. For void handlers whose body is a single dispatch expression or a single try/catch with one dispatch per branch, the return type is widened to CompletableFuture<?> and the dispatch is converted to return ... .getResultMessage();. Once no other references to the gateway field remain, the field, its constructor parameter, and the matching assignment are removed.
  • org.axonframework.migration.MigrateKotlinDslBomImport: Swaps the groupId:artifactId prefix of a Spring Dependency Management mavenBom("g:a:${property("...")}") call in a build.gradle.kts script, leaving the ${property(...)} indirection in place. Optionally updates the literal value of the matching extra["..."] declaration so the version follows the new BOM. Targets a gap in gradle.ChangeManagedDependency where the Kotlin string-template variant of property(...) is not recognized.
  • org.axonframework.migration.MigrateMessageInterceptorSignatures: Rewrites the method signatures of MessageHandlerInterceptor and MessageDispatchInterceptor implementations to their AF5 shape: handle(UnitOfWork, InterceptorChain) -> Object becomes interceptOnHandle(M, ProcessingContext, MessageHandlerInterceptorChain<M>) -> MessageStream<?> (and similarly for the dispatch interceptor). The method body is left untouched — the dropped unitOfWork / interceptorChain references become compile errors, surfacing every call site that needs review. A class-level // TODO(axon4to5): comment points to the migration path doc. The message type M is read from the implements clause; raw implementations fall back to Message. Runs after the AF4 -> AF5 FQN renames.
  • org.axonframework.migration.MigrateSequencingPolicyLambda: Rewrites single-argument SequencingPolicy lambdas (e -> body) to the AF5 shape (e, ctx) -> Optional.ofNullable(body). The AF5 SequencingPolicy.sequenceIdentifierFor method takes both a message and a ProcessingContext, and returns Optional<Object> instead of a nullable Object. Adds the java.util.Optional import. Leaves block-body lambdas, multi-parameter lambdas, and anonymous inner classes alone — those need manual rewriting since the AF4 method name (getSequenceIdentifierFor) and the AF5 method name (sequenceIdentifierFor) differ.
  • org.axonframework.migration.MigrateSnapshotTriggerDefinitionToAnnotation: Replaces AF4 Spring Boot @Bean methods returning SnapshotTriggerDefinition with the AF5 @Snapshotting annotation on the corresponding aggregate class. EventCountSnapshotTriggerDefinition maps to afterEvents; AggregateLoadTimeSnapshotTriggerDefinition maps to afterSourcingTime. Custom implementations leave a TODO comment for manual review.
  • org.axonframework.migration.RemoveTypeArguments: Removes the generic type arguments (<...>) from any usage of the configured fully-qualified type. Preserves the underlying type reference and its surrounding context (variables, parameters, return types, generic bounds, etc.).
  • org.axonframework.migration.ReplaceAggregateLifecycleApply: Replaces every AggregateLifecycle.apply(X) (statically imported or via the class) with eventAppender.append(X), injecting an EventAppender eventAppender parameter into the enclosing method when one is not already declared. Drops the static apply import once no usages remain.
  • org.axonframework.migration.UpgradeAxon4ToAxon5: Migrates an Axon Framework 4.x application to free (Apache 2.0) Axon Framework 5. Bumps the Axon Framework dependency versions, applies per-module rename recipes (one per core framework module), and renames Maven coordinates within the org.axonframework.* namespace. Does NOT touch features dropped from free AF5 (Axon Server, DLQ, DistributedCommandBus) — see UpgradeAxon4ToAxoniq5 for the commercial path.
  • org.axonframework.migration.UpgradeJava: Bumps the Java compiler target in pom.xml/build.gradle to the configured LTS (defaults to 21, the Axon Framework 5 minimum). No-op for modules already at or above the target — projects already on a higher Java release are left untouched.
  • org.axonframework.migration.UpgradeKotlin: Bumps the org.jetbrains.kotlin:* dependency versions and the kotlin-maven-plugin to the configured Kotlin line (defaults to "2.x", the latest Kotlin 2.x). No-op for modules already at or above the target — the underlying upgrade recipes never downgrade. Rejects targets below Kotlin 2.0.
  • org.openrewrite.java.migrate.UpgradeBuildToJava24: Kotlin versions before 2.3 only support up to Java 24. Applies only to modules that actually compile Kotlin (i.e. contain .kt source files), so transitive kotlin-stdlib dependencies do not trigger the cap.

Changed Recipes

  • org.openrewrite.github.ChangeAction was changed:
    • Old Options:
      • newAction: { type: String, required: true }
      • newVersion: { type: String, required: true }
      • oldAction: { type: String, required: true }
    • New Options:
      • newAction: { type: String, required: true }
      • newVersion: { type: String, required: true }
      • oldAction: { type: String, required: true }
      • oldSha: { type: String, required: false }
  • org.openrewrite.github.ChangeActionVersion was changed:
    • Old Options:
      • action: { type: String, required: true }
      • version: { type: String, required: true }
    • New Options:
      • action: { type: String, required: true }
      • oldSha: { type: String, required: false }
      • version: { type: String, required: true }