cds:resolve
Full name:
com.sap.cds:cds-maven-plugin:4.6.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';
Reuse models from dependencies are by default made available globally in the target folder of the overall project root directory. For example, if your dependency is listed in the srv/pom.xml the reuse models are by default resolved to the root target folder.
If you want to make reuse models only available locally for a specific module (e.g. only within scope of srv) set the to property to ${project.build.directory}.
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 |
<to> |
Path |
4.4.0 |
The directory in which the target/cds/ folder is created. By the default the overall project root directory is used. User Property: cds.resolve.to |
Parameter Details
<skip>
Skip extracting and resolving of CDS models.
- Type:
boolean - Required:
No - User Property:
cds.resolve.skip
<to>
The directory in which the target/cds/ folder is created. By the default the overall project root directory is used.
- Type:
java.nio.file.Path - Since:
4.4.0 - Required:
No - User Property:
cds.resolve.to