cds:resolve

Full name:

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

Description:

Extracts models from dependency JARs and places them in target/cds/ for reuse by the CDS Compiler.
Models in JARs are expected to be placed in the cds resources folder. All contents in this folder are copied to target/cds/. It is recommended to specify a unique folder structure for your models, for example by reusing group ID and artifact ID of the JAR.
Here is an example JAR layout:

com/example/.../Some.class
cds/
  com.example.cds/
    my-reuse-models/
      index.cds
      Foo.cds
      data/
        com.example.cds-Foo.csv
      i18n/
        i18n.properties
You can then refer to these reuse models in your CDS files:
using { com.example.cds.Foo as Foo } from 'com.example.cds/my-reuse-models';
If your dependency is listed in the srv/pom.xml the reuse models are only available in CDS files placed in the srv folder. This ensures that multiple independent application modules can define their reuse artifacts independently. If you place a dependency in the root pom.xml the reuse models are available in all modules, including the db folder.

Attributes:

  • Requires a Maven project to be executed.
  • Executes as an aggregator goal.
  • Requires dependency resolution of artifacts in scope: compile+runtime.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 2.2.0.
  • Binds by default to the lifecycle phase: generate-sources.

Optional Parameters

Name Type Since Description
<skip> boolean - Skip extracting and resolving of CDS models.
User Property: cds.resolve.skip

Parameter Details

<skip>

Skip extracting and resolving of CDS models.
  • Type: boolean
  • Required: No
  • User Property: cds.resolve.skip