We have released new versions of the SAP Cloud SDK. In detail, the following components are now available in new versions:
- Java libraries in version 3.20.0
- Continuous delivery toolkit in version v33
At the end of the article, you will find a set of instructions on how to update to the new versions.
Java Libraries: Release Highlights 3.20.0
You can update your dependencies of the SAP Cloud SDK for Java to version 3.20.0 and get the new version from Maven Central.
In this release, we added a new builder pattern for type
Resilience4jDecorationStrategy enabling custom function decoration properties.
Also, the experimental interface
ServiceWithNavigableEntities was introduced for recursive traversal of navigation properties in entity sets that are part of an OData v4 virtual data model (VDM). This generic type offers type-safe methods to create a request along with chained entities with their navigation properties. By delegating to the existing request builder classes, the interface supports all basic CRUD operations (create, read, update, delete), plus count. All existing request modifiers are supported (e.g.
select statements in
Read). The methods and sub-types in this interface are still open for changes in the future.
As an example, here is how to create a new Trip in Vacation (id 2020) of a person (username "John").
Let’s assume that our API expects this HTTP request:
In our cloud application using SAP Cloud SDK, we would write this code:
Trip tripItem = createTrip(); CreateRequestBuilder createRequest = service .forEntity( Person.builder().username("John").build() ) .navigateTo( Person.VACATIONS ) .forEntity( Vacation.builder().id(2020).build() ) .navigateTo( Vacation.TRIPS ) .create( tripItem ); createRequest.execute( destination );
Several further improvements are listed in the full release notes.
An issue with the OData client generator was fixed, which prevented parsing of definitions in OpenAPI format with versions higher than 3.
As usual, the full release notes contain a list of all improvements in this release.
Continuous Delivery Toolkit: Release Highlights v33
We have also released version v33 of our out-of-the-box continuous delivery offering consisting of a ready-made Jenkins server and a complete delivery toolkit.
The shared configuration property in the pipeline configuration file
.pipeline/config.yml has changed. From this release on, it must be a list of strings named
customDefaults, located on the top level. This change is necessary to align the SAP Cloud SDK Pipeline closer with Project Piper.
Maven 3.6 or higher is required
Please note that maven-related functionality requires Maven version 3.6 or higher in the configured Docker image.
SonarQube scans can run in all branches of a project. This can be enabled by setting the
runInAllBranches property in the pipeline configuration.
You can find further fixes and improvements in the complete release notes.
How to Update
To update the version of the SAP Cloud SDK Java libraries used in an existing project, proceed as follows:
- Open the pom.xml file in the root folder of your project.
- Locate the dependency management section and therein the
- Update the version of that dependency to
With this, you are already done thanks to the “bill of material” (BOM) approach. Your dependency should look like this:
<dependencyManagement> <dependencies> <dependency> <groupId>com.sap.cloud.sdk</groupId> <artifactId>sdk-bom</artifactId> <version>3.20.0</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> <!-- possibly further managed dependencies ... --> </dependencyManagement>
If you update from a version prior to 3.0.0, have a look at our migration guide.
If you are using the SAP Cloud SDK in a project of the SAP Cloud Application Programming Model, replace
sdk-modules-bom to only update the version of SDK modules, not further dependencies.
You can now recompile your project (be aware of the compatibility notes, though) and leverage the new features of the SAP Cloud SDK in version 3.20.0.
Of course, you can also generate a new project that uses version 3.20.0 from the start by running the Maven archetypes for Neo or Cloud Foundry with
npm update in the root folder of your module. Note that this will also update other modules, unless you explicitly specify which packages to update. If you want to check beforehand what will change, use
Continuous Delivery Toolkit
If you are using the pipeline with a fixed version (as recommended since v7), update the continuous delivery toolkit with the following command, that you run on the server hosting the cx-server:
./cx-server update image
Learn more about SAP Cloud SDK
To learn how others in the community use SAP Cloud SDK you can check out more related blog posts.
Are you interested in a particular topic? It might be helpful to search the Q&A place? Feel free to ask your question there and do not forget to select the tag
SAP Cloud SDK.
If you are new to SAP Cloud SDK, get started and gain first hand-on exercise by following our tutorials.