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.
Java Libraries: Release Highlights 3.15.1
You can update your dependencies of the SAP Cloud SDK for Java to version 3.15.1 and consume the new version from
Maven Central.
OData v4 support
With our
previous release two weeks ago, we announced the preview support for OData v4. The current SAP Cloud SDK for Java release
3.15.1
contains stable support for several OData v4 features. This means, that you can use these productively in your code and that there will be no breaking changes to the API in new minor versions of the SAP Cloud SDK.
The OData v4 Virtual Data Model (VDM) is also stable as of this release. This includes the following parts.
execute()
on all request builders (e.g., CreateRequestBuilder
)
select()
, filter()
, top()
, skip()
, and search()
on GetAllRequestBuilder
GetByKeyRequestBuilder.select()
of()
, and()
, or()
, not()
for defining a SearchExpression
includingFields()
, replacingEntity()
, modifyingEntity()
on UpdateRequestBuilder
- The generic exception class
ODataException
- The classes
NavigationProperty
, ComplexProperty
and SimpleProperty
- The OData v4 generator now generates
ComplexProperty
fields on entities that can be used to build queries. Single instances and collections of complex types are supported.
- Provide support for unbound functions in OData v4. The Odata v4 generator generates unbound functions at the service level.
- The OData v4 generator now creates entity classes that are only referenced by navigation properties and functions (not part of an entity set).
A walk through the new OData v4 support is presented in a
separate blog post. More posts will be published as additional features are implemented in the SAP Cloud SDK. Stay tuned!
Further improvements
In the latest release, we replaced our implementation for handling communication with
XSUAA service instances by the library
XSUAA Token Client and Token Flow API. There are a few things to consider when moving to the new library.
- If you mock XSUAA service requests in your tests, some assertions might need to be updated. When using the new library, XSUAA request parameters should be passed as HTTP body content instead of query arguments.
- The internally used types
SubdomainReplacer
and DefaultSubdomainReplacer
became obsolete and were removed. The usage of this classes was replaced by the new library.
- The behavior of following methods in the utility class
XsuaaService
has been changed.
The old behavior is implemented in following methods.
The change was made in order to better reflect on the internal logic of these methods. In addition to "Token Grant", the "Token Exchange" flavored operation will perform an authorization request with "Refresh Token" flow, which is required for Principal Propagation when manually consuming the CloudFoundry Connectivity Service. Please update your code accordingly.
We renamed the module
com.sap.cloud.sdk.services:blockchain
to better reflect its focus on the Multichain Service. For future updates, refer to the module
com.sap.cloud.sdk.services:blockchain-client-multichain
in your
pom.xml
file.
Several further improvements are listed in the
full release notes.
Java Libraries version 2 are in Maintenance
In August 2019 we released the
major upgraded version 3 of the SAP Cloud SDK for Java. We thank you for the great feedback you provided to us in the time since then so that we could make the SDK even more helpful to you. In the meantime, we kept providing bugfixes and updates for version 2 as well. Note that with this release we excluded the Java libraries version 2.
For projects using version 2 of the SDK for Java,
upgrading to version 3 is strongly encouraged. Reach out to us if you have any questions. We're happy to help.
You can still consume the latest version 2 release from
Maven Central.
JavaScript Libraries: Release Highlights 1.18.0
The
JavaScript libraries of the SAP Cloud SDK are now available in version 1.18.0.
SAP Cloud SDK goes Open Source
We're more than happy to announce that the release
1.18.0
is the first release built from our recently
open sourced code base. Future development for following packages will take place on
github.com:
- SAP Cloud SDK for JavaScript core
- SAP Cloud SDK for JavaScript OData client generator
- SAP Cloud SDK for JavaScript general utilities
- SAP Cloud SDK for JavaScript test utilities
- SAP Cloud SDK Analytics Usage
Note that some packages, such as the SAP S/4HANA Virtual Data Model are not open sourced at this time. For this reason, you'll need to adjust your
package.json
to refer to the latest versions of all packages. Please review the
update section on update instructions.
After
command line interface (CLI) for SAP Cloud SDK and the
Continuous Delivery pipeline, the SAP Cloud SDK for JavaScript is another main component that we now provide as open source project.
As usual, the
full release notes contain a list of all improvements in this release.
We have also released version v29 of our
out-of-the-box continuous delivery offering consisting of a ready-made Jenkins server and a complete delivery toolkit.
Adding support for multi-module Maven projects
With this version, we added support for multi-module Maven projects. Please consider following notes.
- The stage
Unit Tests
was merged into the Build
stage in order to remove the need for the additional unit-tests
module. If you have an extension for this stage it should be adapted to extend the Build
stage instead. The unit tests can be moved to your productive module.
- The steps
fortifyScan
, sonarQubeScan
, and staticCodeChecks
also support multi-module Maven projects.
Aligning with general purpose pipeline
In order to align with the general purpose pipeline, we made some changes on the configuration directory structure. Please adjust the files in your projects.
- The pipeline configuration is now expected at
.pipeline/config.yml
. The old location .pipeline_config.yml
will be supported for a limited time. Please move the configuration file.
- Extensions are now expected in
.pipeline/extensions
. The old location pipeline/extensions
will be supported for a limited time, please move your extensions.
Further improvements
We included a new pipeline stage
postPipelineHook
, that can be used to run custom actions after the pipeline has finished.
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
3.15.1
.
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.15.1</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-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 3.15.1.
Of course, you can also generate a new project that uses version 3.15.1 from the start by running the Maven archetypes for
Neo or
Cloud Foundry with
-DarchetypeVersion=3.15.1
(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
.
Some packages of the SAP Cloud SDK for JavaScript has been migrated to
github.com. As a result, the packages are also renamed as shown in the below list. You'll need to update your
package.json
to use the new packages.
@Sap/cloud-sdk-util
was renamed to @Sap-cloud-sdk/util
@Sap/cloud-sdk-analytics
was renamed to @Sap-cloud-sdk/analytics
@Sap/cloud-sdk-core
was renamed to @Sap-cloud-sdk/core
@Sap/cloud-sdk-generator
was renamed to @Sap-cloud-sdk/generator
@Sap/cloud-sdk-test-util
was renamed to @Sap-cloud-sdk/test-util
Follow this steps to update your project:
- Search for the old package names in all
dependencies
, devDependencies
, peerDependencies
in your package.json
.
- Replace the old package name (e.g.
@Sap/cloud-sdk-core
) with new one (e.g. @Sap-cloud-sdk/core
).
- Use a stable version of the open source package (e.g.
^1.18.0
).
- Install your dependencies again to reflect the changes (e.g.,
npm i
).
- Search for your source code for uses of the old packages (e.g.
require()
and replace them with new names.
If you are using the SAP Cloud SDK
command line interface (CLI) you should also update your locally installed package to version
0.1.7
.
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.