You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add section for CAP Java OpenRewrite recipes (#2194)
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
Co-authored-by: Marc Becker <marc.becker@sap.com>
Co-authored-by: Christian Georgi <christian.georgi@sap.com>
@@ -22,7 +25,31 @@ uacp: Used as link target from Help Portal at https://help.sap.com/products/BTP/
22
25
23
26
[[toc]]
24
27
25
-
## CAP Java 4.9 to CAP Java 5.0 { #four-to-five }
28
+
## Automatic CAP Java Migrations with OpenRewrite
29
+
30
+
For any Java related changes of the CAP Java APIs we try to make the transition from the old version to the new version as smooth as possible. Consequently, we provide [OpenRewrite recipes](https://docs.openrewrite.org) with migrations for our API changes so that larger projects can easily consume them.
31
+
32
+
### Running OpenRewrite Recipes
33
+
34
+
As migration is a one-time operation, run the OpenRewrite `recipes` as a command through Maven. Take this call as an example:
Here, the *migration*`com.sap.cds.services.migrations.MigrateStatements` from CAP Java's OpenRewrite Maven artifact `com.sap.cds:cds-services-recipes` is called in the given project context. The *migration* is a container for one or more recipes. A recipe is a rule that tells OpenRewrite how to transform code.
45
+
46
+
### Currently Released CAP Java Migrations
47
+
48
+
|Name |Description|Available since|
49
+
|--------|-----------|---------------|
50
+
|[com.sap.cds.services.migrations.MigrateStatements](../releases/2025/aug25#typed-query-results)|Migrates CQN statements to comply with typed Query API changes in 4.3.0.|4.3.0|
51
+
52
+
## CAP Java 4.9 to CAP Java 5.0 (TBA) { #four-to-five }
26
53
27
54
### Spring Boot 4
28
55
@@ -1426,3 +1453,4 @@ After rebuilding and restarting your application, your Application Services are
0 commit comments