Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions java/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ As migration is a one-time operation, run the OpenRewrite `recipes` as a command
```bash-vue
mvn org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=com.sap.cds:cds-services-recipes:{{ versions.java_services }} \
-Drewrite.activeRecipes=com.sap.cds.services.migrations.Cap_4.9
-Drewrite.activeRecipes=com.sap.cds.services.migrations.Cap_5.0
```

Here, the *recipe* `com.sap.cds.services.migrations.Cap_4.9` from CAP Java's OpenRewrite Maven artifact `com.sap.cds:cds-services-recipes` is called in the given project context. The *recipe* is a container for one or more recipes. A recipe is a rule that tells OpenRewrite how to transform code.
Here, the *recipe* `com.sap.cds.services.migrations.Cap_5.0` from CAP Java's OpenRewrite Maven artifact `com.sap.cds:cds-services-recipes` is called in the given project context. The *recipe* is a container for one or more recipes. A recipe is a rule that tells OpenRewrite how to transform code.

### Currently Released CAP Java Migrations

Expand All @@ -52,6 +52,17 @@ The following table lists the individual recipes provided by CAP for APIs that h
|[com.sap.cds.services.migrations.ServiceExceptionUtils](#removed-java-apis-4-to-5)|Replaces deprecated methods in `ServiceExceptionUtils`.|4.9.0|
|[com.sap.cds.services.migrations.MigrateSaasRegistryDependency](#removed-java-apis-4-to-5)|Replaces deprecated `SaasRegistryDependency` methods `setAppId`/`setAppName`/`getAppId`/`getAppName` with their `xsappname`-based replacements.|4.9.0|
|[com.sap.cds.services.migrations.UclMigration](#removed-java-apis-4-to-5)|Migrates deprecated UCL result getter and setter methods to the new API.|4.9.0|
|com.sap.cds.services.migrations.Cap_4.9_Properties|Replaces deprecated application properties with their CAP Java 4.9 equivalents (for example `cds.mcp.autoConfig.*` → `cds.mcp.autoWired.*`, `cds.taskScheduler.enabled` → `cds.outbox.persistent.scheduler.enabled`).|4.9.0|
|[com.sap.cds.services.migrations.Cap_5.0_Properties](#removed-properties-4-to-5)|Removes application properties that are no longer supported in CAP Java 5.0 and have no replacement (for example `cds.errors.combined`, `cds.sql.collate`, `cds.sql.hana.optimizationMode`, `cds.odataV4.searchMode`, `cds.odataV2.searchMode`, and the removed `cds.multiTenancy.serviceManager.*` flags).|5.0.0|
|[com.sap.cds.services.migrations.Cap_5.0_OutboxOrdered](#adjusted-defaults-4-to-5)|Adds `ordered: true` to every custom entry under `cds.outbox.services` (except the built-in `DefaultOutboxOrdered`/`DefaultOutboxUnordered`) to preserve the previous behavior, as the default of `cds.outbox.services.<name>.ordered` changes from `true` to `false` in CAP Java 5.0.|5.0.0|

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far we didn´t put the CAP version as part of recipe name for individual recipes. except the ones for properties and the umbrella ones. But that´s not changeable anymore I guess.


In addition, the following umbrella recipes are provided per release. Each one includes all individual recipes for APIs deprecated in this AND previous releases, plus Maven dependency upgrades for all CAP Java modules to the matching version. Run the latest umbrella recipe matching the version of the CAP Java SDK you are upgrading to.

|Name |Description|Available since|

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table feels redundant as the table above already specifies the initial release of the recipe. It´s the same information in a different representation. Maybe it is sufficient to tell that each release gets a dedicated umbrella recipe.

|--------|-----------|---------------|
|com.sap.cds.services.migrations.Cap_4.8|Migrates an application to CAP Java SDK 4.8. Includes `MigrateStatements` and upgrades all CAP Java Maven dependencies to `4.8.x`.|4.8.0|
|com.sap.cds.services.migrations.Cap_4.9|Migrates an application to CAP Java SDK 4.9. Includes `Cap_4.8`, `UclMigration`, `MigrateSaasRegistryDependency`, `ServiceExceptionUtils`, `Cap_4.9_Properties`, and upgrades all CAP Java Maven dependencies to `4.9.x`.|4.9.0|
|com.sap.cds.services.migrations.Cap_5.0|Migrates an application to CAP Java SDK 5.0. Includes `Cap_4.9`, `Cap_5.0_Properties`, `Cap_5.0_OutboxOrdered`, and upgrades all CAP Java Maven dependencies to `5.0.x`.|5.0.0|

## CAP Java 4.9 to CAP Java 5.0 (TBA) { #four-to-five }

Expand Down
Loading