cds:install-cdsdk
Full name:
com.sap.cds:cds-maven-plugin:3.4.0:install-cdsdk
Description:
Install the @sap/cds-dk into a CAP Java project.
By default, this goal looks for an already installed @sap/cds-dk and skips installation if it was found. It doesn't validate the found version against the requested version and the existing @sap/cds-dk could be outdated. Add property -Dcds.install-cdsdk.force=true
to the Maven command line to force the installation of the @sap/cds-dk in the configured version.
Note: This goal ignores any dependency (including version) to @sap/cds-dk, @sap/cds or @sap/cds-compiler in the package.json of the CAP Java project.
Alternative way to install the @sap/cds-dk:
If you need to install additional Node.js modules in your CAP Java project, we recommend to use a different approach for the installation. In that case, maintain all dependencies, including the @sap/cds-dk, as a devDependency in the package.json:
"devDependencies": {
"@sap/cds-dk": "version"
}
Also remove the execution of goal cds:install-cdsdk from your pom.xml and replace it with goal cds:npm:
<execution>
<id>cds.install-dependencies</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
This execution configuration runs the npm install
command during each Maven build for your project and installs @sap/cds-dk and other dependencies. The npm cliwill install the dependencies, if they are not installed or not available in the requested versions.
The
cds.install-cdsdk.global
property needs to be removed from the pom.xml as the version is already maintained in package.json.
Attributes:
- Requires a Maven project to be executed.
- Executes as an aggregator goal.
- The goal is not marked as thread-safe and thus does not support parallel builds.
- Since version:
1.7.0
. - Binds by default to the lifecycle phase:
initialize
.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<version> |
String |
- |
Version of @sap/cds-dk to install. The value has to be a valid semantic version. User Property: cds.install-cdsdk.version |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<arguments> |
String |
1.23.0 |
Define additional arguments that are passed to the command line that is executed to install the @sap/cds-dk. The arguments are separated by spaces. For example, it can be used to enable the verbose output of npm with the additional argument --dd .User Property: cds.install-cdsdk.arguments |
<environmentVariables> |
Map<String,String> |
1.26.0 |
Additional environment variables to set on the command line. |
<force> |
boolean |
- |
Force installation of @sap/cds-dk, even if it's already installed in any version. Default: false User Property: cds.install-cdsdk.force |
<global> |
boolean |
- |
Enable global installation of @sap/cds-dk. Default: false User Property: cds.install-cdsdk.global |
<npmRegistry> |
String |
- |
URL of NPM registry to use. User Property: cds.npm.registry |
<skip> |
boolean |
- |
Skip execution of this goal. Default: false User Property: cds.install-cdsdk.skip |
<workingDirectory> |
File |
- |
Define the working directory to use for installation of @sap/cds-dk. If omitted, the goal uses the directory containing a .cdsrc.json or package.json file. It goes up the project hierarchy on the file system until one of these files is found or the top-level project directory is reached. |
Parameter Details
<arguments>
npm
with the additional argument --dd
.- Type:
java.lang.String
- Since:
1.23.0
- Required:
No
- User Property:
cds.install-cdsdk.arguments
<environmentVariables>
- Type:
java.util.Map<java.lang.String, java.lang.String>
- Since:
1.26.0
- Required:
No
<force>
- Type:
boolean
- Required:
No
- User Property:
cds.install-cdsdk.force
- Default:
false
<global>
- Type:
boolean
- Required:
No
- User Property:
cds.install-cdsdk.global
- Default:
false
<npmRegistry>
- Type:
java.lang.String
- Required:
No
- User Property:
cds.npm.registry
<skip>
- Type:
boolean
- Required:
No
- User Property:
cds.install-cdsdk.skip
- Default:
false
<version>
- Type:
java.lang.String
- Required:
Yes
- User Property:
cds.install-cdsdk.version
<workingDirectory>
- Type:
java.io.File
- Required:
No