Skip to Content
Product Information
Author's profile photo Henning Heitkoetter

New Versions of SAP Cloud SDK: 2.19.0 for Java, 1.5.0 for JavaScript, and v21 of Continuous Delivery Toolkit

We have released new versions of the SAP Cloud SDK. In detail, the following components are now available in new versions:

In this blog post, we will walk you through the highlights of these releases. For a complete overview, visit our release notes for the Java libraries, for the JavaScript libraries, and for the continuous delivery toolkit. The release notes also include the change log of all our releases so far.
At the end of the article, you will find a set of instructions on how to update to the new versions.

This week, we hosted the first community call for the SAP Cloud SDK. This series is open to everyone. Each monthly call features the latest news about the SAP Cloud SDK as well as deep dives into specific topics, as explained in this blog post. Register here for the next sessions in this new series.

The first event of SAP TechEd 2019 is less than three months away. Now is the time to register for this premier educational event about SAP technology. Like last year, the SAP Cloud SDK will have a strong presence in Las Vegas, Barcelona, and Bangalore.

Java Libraries: Release Highlights 2.19.0

You can update your dependencies of the SAP Cloud SDK for Java to version 2.19.0 and consume the new version from Maven Central.

By updating the Java libraries of SAP Cloud Application Programming Model (*) to version 1.31.1, we were able to bring several improvements to users of the SAP Cloud SDK: OData by-key requests now also work if the key contains a slash. Furthermore, HTTP resources had not been properly closed at several places, which may have led to exhausted connection pools and a hanging application. This is now fixed as well. Finally, it is now possible to filter in queries against null values.

In the Message VDM, we now support messages of type TextMessage from JMS in JmsMessagingVdmConverter. It is now possible to extract the message payload also from messages of such type (in addition to ByteMessage).

Version 2.19.0 of the OData VDM generator fixes an issue where OData client classes could not be generated due to name clashes in case of entity types with the same name, except for upper / lower case.

Several further improvements are listed in the full release notes.

JavaScript Libraries: Release Highlights 1.5.0

The JavaScript libraries of the SAP Cloud SDK are now available in version 1.5.0.

OAuth2 Client Credentials

The SAP Cloud SDK relieves you of worrying about connectivity and authentication when accessing downstream systems and services. Based on the destination service of SAP Cloud Platform, the SDK takes care of lower level infrastructure requirements when issuing HTTP requests as part of the OData client classes. Already before version 1.5.0, the SDK for JavaScript handled various authentication types such as basic authentication and OAuth2 SAML Bearer Flow.

Version 1.5.0 introduces support for the OAuth2ClientCredentials flow as an additional authentication type . This flow is often used when the application acts as a client to a service for which it previously received authorization. If you have defined a destination to use OAuth2 Client Credentials and provided the required information, you can now use the mentioned capabilities of the SDK which will take care of the authentication.

Further improvements

Resolving destinations and authentication for accessing downstream systems may require several HTTP roundtrips with the destination and connectivity service on SAP Cloud Platform. The SDK for JavaScript now caches retrieved destination information and access tokens in-memory to improve performance when using the destination service.

We have fixed a bug where the request URL for OData function imports was not generated correctly, leading to failing requests.

Also, authorization headers supplied via the withCustomHeaders function are now also correctly applied when fetching CSRF tokens ahead of modifying OData requests.

The OData client generator now correctly annotates optional properties of entities by appending ? as postfix in TypeScript. This will reduce the number of warning in strict mode.

As usual, the full release notes contain a list of all improvements in this release.

Continuous Delivery Toolkit: Release Highlights v21

We have also released version v21 of our out-of-the-box continuous delivery offering consisting of a ready-made Jenkins server and a complete delivery toolkit.

General availability of pipeline extensibility

With version v21, we are making the option to extend the pipeline with custom logic generally available. This previously existing feature is now considered safe for use, although we recommend to stick with the default pipline for most use cases.

The support for project-specific pipeline extensions allows you to change or rewrite individual stages of the pipeline using Groovy scripts. It should not be required for most users to do this, but there are few good use-cases for this, such as:

  • Adding custom lint tools: As of v21, one lint tool (SAPUI5 Best Practices) is automatically run as part of the Pipeline. You may want to add additional linters (such as Checkstyle) to the pipeline to ensure common code standards in your team.
  • Running additional third party code analyzers: The pipeline has built-in support for check tools such as Checkmarx, Fortify, and WhiteSource. Additional tools can be integrated by providing a custom additionalTools extension.

For background information and usage instructions, see the documentation on pipeline extensibility.

Changes to supported project structure for SAP Cloud Application Programming Model projects

Since a couple of releases, the pipeline out-of-the-box supports Java projects following the SAP Cloud Application Programming Model (CAP), using the multi-target application (MTA) concept for build and deployment. The expected structure for such projects has changed with v21 in order to simplify the structure and align it with CAP best practices.

Please refer to the SAP Cloud Application Programming Model / MTA section of the build tools documentation for details on accepted project structures. It is planned that the CAP project wizard generates projects with this structure in the future. We also plan to provide more detailed instructions to migrate existing CAP/MTA projects.

Further improvements

We have improved the SAPUI5 Best Practices linting. In previous versions, the SAPUI5 Best Practices linter was limited to a single UI5 component per project. The new version automatically discovers UI5 components in your project and lints them. Please refer to the documentation for usage instructions. The linter can also be run from the command line as described in the README file.

With v21, npm audit and WhiteSource scans are run for all directories that contain a package.json file.

You can find further fixes and improvements in the complete release notes.

How to Update

Java libraries

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 sdk-bom dependency.
  • Update the version of that dependency to 2.19.0.

With this, you are already done thanks to the “bill of material” (BOM) approach. Your dependency should look like this:

    <!-- possibly further managed dependencies ... -->

If you are using the SAP Cloud SDK in a project of the SAP Cloud Application Programming Model, replace sdk-bom with 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 2.19.0.

Of course, you can also generate a new project that uses version 2.19.0 from the start by running the Maven archetypes for Neo or Cloud Foundry with -DarchetypeVersion=2.19.0 (or RELEASE).

JavaScript libraries

To update the version of the SAP Cloud SDK JavaScript libraries used in an existing project, use the command 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 npm outdated.

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

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.