cds:add
Full name:
com.sap.cds:cds-maven-plugin:4.0.2: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: 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.
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:
- H2H2 in-memory support is added
- SQLITESqlite in-memory support is added
- MTXAdds required Multitenancy dependencies and profiles to the CAP Java project, but not the MTXS sidecar.
- POSTGRESQLAdds PostgreSQL support
- LIQUIBASEAdds Liquibase and Testcontainers support
- SECURITYAdds security support
- KAFKAAdds Kafka support
- SAMPLEAdds sample files to the project
- TINY_SAMPLEAdds sample files to the project with minimal content
- INTEGRATION_TESTAdds an integration test module to the CAP Java project
- AUDIT_LOGGINGAdds audit logging support
- ODATAAdds OData V4 or V2 support. Use the option
-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. - HEALTH_CHECKAdds health check support
- CFAdds CloudFoundry support.
- K8SAdds Kubernetes support.
- APPLICATION_LOGGINGAdds Application Logging support.
- AMSAdds AMS support.
- ORDAdds ORD support.
- MAVEN_DEPENDENCYAdds 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_PLUGINAdds 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_SERVICEAdds 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.
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