cds:add
Full name:
com.sap.cds:cds-maven-plugin:4.4.1:add
Description:
Adds support for a feature to the CAP Java project. If the feature already exists, nothing is done.
Call mvn cds:add -Dfeature=MTX or mvn com.sap.cds:cds-maven-plugin:add -Dfeature=MTX to add Multitenancy support.
Note: This goal can only be executed from the command line.
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:
2.1.0.
Required Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<feature> |
String |
- |
Defines the feature to add.
Supported values are:
Note: The Liquibase feature also adds support for TestContainers to the project, which requires a Docker installation. If you experience problems with TestContainers or don't have a Docker installation, remove this dependency. User Property: feature |
<profile> |
String |
- |
Defines the profile name in application.yaml where this feature is added. An existing profile with the same name is overwritten by the new feature. Default: defaultUser Property: profile |
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<options> |
List<String> |
- |
Options for a feature. The options are passed as a list of key-value pairs separated by an equal sign. Key-value pairs are separated by a comma. For example, -Doptions=version=v4. As an alternative format, each option can be specified by a single property, e.g. -Doptions.version=v4.User Property: options |
Parameter Details
<feature>
Defines the feature to add.
Supported values are:
Note: The Liquibase feature also adds support for TestContainers to the project, which requires a Docker installation. If you experience problems with TestContainers or don't have a Docker installation, remove this dependency.
Supported values are:
- H2: H2 in-memory support is added
- SQLITE: Sqlite in-memory support is added
- MTX: Adds required Multitenancy dependencies and profiles to the CAP Java project, but not the MTXS sidecar.
- POSTGRESQL: Adds PostgreSQL support
- LIQUIBASE: Adds Liquibase and Testcontainers support
- SECURITY: Adds security support
- KAFKA: Adds Kafka support
- SAMPLE: Adds sample files to the project
- TINY_SAMPLE: Adds sample files to the project with minimal content
- INTEGRATION_TEST: Adds an integration test module to the CAP Java project
- AUDIT_LOGGING: Adds audit logging support
- ODATA: Adds OData V4 or V2 support. Use the option
-Doptions.version=v4to add OData V4 support or-Doptions.version=v2to add OData V2 support. If no version is specified, OData V4 is added. - HEALTH_CHECK: Adds health check support
- CF: Adds CloudFoundry support.
- K8S: Adds Kubernetes support.
- APPLICATION_LOGGING: Adds Application Logging support.
- AMS: Adds AMS support.
- ORD: Adds ORD support.
- MAVEN_DEPENDENCY: Adds a Maven dependency. This feature supports the following options:
- groupId - The groupId of the Maven dependency. This option is required.
- artifactId - The artifactId of the Maven dependency. This option is required.
- version - The version of the Maven dependency. This option is optional.
- scope - The scope of the Maven dependency. This option is optional.
- CAP_JAVA_PLUGIN: Adds a CAP Java Plugin dependency. This feature supports the following options:
- groupId - The groupId of the Maven dependency. This option is required.
- artifactId - The artifactId of the Maven dependency. This option is required.
- version - The version of the Maven dependency. This option is optional.
- scope - The scope of the Maven dependency. This option is optional.
- REMOTE_SERVICE: Adds a remote service configuration. Each option has to be provided as a Java property with prefix
options., e.g.-Doptions.name=my.sample.Service. This feature supports the following options:- type - The type of the service to add. Supported values are: odata-v4, odata-v2, hcql, rfc. This option is required.
- name - The name of the service to add. This option is required.
- destination.* - All destination related properties starting with prefix
destination, e.g.-Doptions.destination.name=myDestination. - http.* - All HTTP related properties starting with prefix
http, e.g.-Doptions.http.csrf.enabled=true. - binding.* - All binding related properties starting with prefix
binding, e.g.-Doptions.binding.name=myBinding. - model - The name of the service in the model. This option is optional.
- ATTACHMENTS: Adds the Attachments Plugin for SAP Cloud Application Programming Model to the project.
Note: The Liquibase feature also adds support for TestContainers to the project, which requires a Docker installation. If you experience problems with TestContainers or don't have a Docker installation, remove this dependency.
- Type:
java.lang.String - Required:
Yes - User Property:
feature
<options>
Options for a feature. The options are passed as a list of key-value pairs separated by an equal sign. Key-value pairs are separated by a comma. For example,
-Doptions=version=v4. As an alternative format, each option can be specified by a single property, e.g. -Doptions.version=v4.- Type:
java.util.List<java.lang.String> - Required:
No - User Property:
options
<profile>
Defines the profile name in application.yaml where this feature is added. An existing profile with the same name is overwritten by the new feature.
- Type:
java.lang.String - Required:
Yes - User Property:
profile - Default:
default