cds:add
Full name:
com.sap.cds:cds-maven-plugin:3.7.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.
Allowed values are:
-Doptions=version=v4 to add OData V4 support or -Doptions=version=v2 to add OData V2 support. If no version is specified, OData V4 is added.
options. , e.g. -Doptions.name=my.sample.Service . This feature supports the following options:
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: default User 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. -options.version=v4 .User Property: options |
Parameter Details
<feature>
Defines the feature to add.
Allowed 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.
Allowed 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
- 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
- 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.name - The name of the destination used by the service. This option is required.
- destination.property.url - The URL of the destination used. This option is optional.
- http.csrf.enabled - Enables or disables the CSRF support of the HTTP protocol. This option is optional.
- http.suffix - The HTTP suffix. This option is optional.
- http.headers.* - The HTTP headers to add. This option is optional.
- model - The name of the service in the model. This option is optional.
-Doptions=version=v4
to add OData V4 support or -Doptions=version=v2
to add OData V2 support. If no version is specified, OData V4 is added.
options.
, e.g. -Doptions.name=my.sample.Service
. This feature supports the following options:
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. -options.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