cds:cds

Full name:

com.sap.cds:cds-maven-plugin:3.4.0:cds

Description:

Execute CDS commands on the CAP Java project.
Call mvn cds:cds or mvn com.sap.cds:cds-maven-plugin:cds on the command line to execute all configured CDS commands of the project in current directory.

Several CDS commands can be configured in one execution block and they’re executed in the specified order. If a command execution fails, the overall goal execution is stopped and the Maven build fails.

Note: This goal requires the installation of the @sap/cds-dk with a minimum version 4.0.0, either locally or globally. The goal cds:install-cdsdk can be used for this task.

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: generate-sources.

Optional Parameters

Name Type Since Description
<cdsdkVersion> String 2.4.0 Version of @sap/cds-dk to use with npx, by supplying --package @sap/cds-dk@<version>. The value has to be a valid semantic version.
User Property: cds.cdsdk-version
<commands> List<String> - Define a list of CDS commands to be executed in the specified order.
For example:
  • build --for java
  • deploy --to h2 --with-mocks --dry > "${project.basedir}/src/main/resources/schema.sql"
Note: Ensure to quote paths, as they may contain spaces.
<documentation> boolean 1.17.0 Determine whether to generate JavaDoc for the generated Java POJOs.
Default: true
User Property: cds.documentation
<environmentVariables> Map<String,String> 1.26.0 Additional environment variables to set on the command line.
<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.cds.skip
<workingDirectory> File - The working directory to use during cds command execution. If not specified, 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

<cdsdkVersion>

Version of @sap/cds-dk to use with npx, by supplying --package @sap/cds-dk@<version>. The value has to be a valid semantic version.
  • Type: java.lang.String
  • Since: 2.4.0
  • Required: No
  • User Property: cds.cdsdk-version

<commands>

Define a list of CDS commands to be executed in the specified order.
For example:
  • build --for java
  • deploy --to h2 --with-mocks --dry > "${project.basedir}/src/main/resources/schema.sql"
Note: Ensure to quote paths, as they may contain spaces.
  • Type: java.util.List<java.lang.String>
  • Required: No

<documentation>

Determine whether to generate JavaDoc for the generated Java POJOs.
  • Type: boolean
  • Since: 1.17.0
  • Required: No
  • User Property: cds.documentation
  • Default: true

<environmentVariables>

Additional environment variables to set on the command line.
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.26.0
  • Required: No

<npmRegistry>

URL of NPM registry to use.
  • Type: java.lang.String
  • Required: No
  • User Property: cds.npm.registry

<skip>

Skip execution of this goal.
  • Type: boolean
  • Required: No
  • User Property: cds.cds.skip
  • Default: false

<workingDirectory>

The working directory to use during cds command execution. If not specified, 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.
  • Type: java.io.File
  • Required: No