Local development

On Java the loop is a Maven build and a Spring Boot application: mvn cds:watch runs the CDS build and starts the application, and how a change is picked up depends on whether Spring Boot Devtools are on the project rather than on CAP. The in-memory database is H2, and the mock users come from the security configuration the runtime creates when the Spring Boot security starter is there.

Showing artifacts, examples and content with confirmed Java applicability. View All CAP

Overview

SAP SHIPS

mvn cds:watch, the watch goal of the CDS Maven plugin, does the CDS build and can start the application, and with Spring Boot Devtools on the project any change reloads the application context instead of restarting it. The runtime creates a security configuration that accepts mock users for test purposes, initialized only when the Spring Boot security starter is in the pom and set to disabled by the production profile, and H2 is the in-memory database capire recommends for local development and testing.

Not covered: Without Devtools the watch goal performs a complete restart of the application after a CDS model change, which capire calls slower; on Windows the goal only works if they are enabled, and Devtools detects changes to .class files only. The local database is not the deployed one: CAP gives H2 no production support, and SQLite is to run with a connection pool of one, which serialises all database transactions.

THE COMMUNITY ADDS

Artifacts3

3 of 3 artifacts
ArtifactSignals
Apps1
com.sap.cds:cds-feature-dev-dashboardBrowser dashboard for a running CAP Java service during development
Signals
none
Build tools1
com.sap.cds:cds-maven-pluginMaven plugin running CDS build steps in a CAP Java project
Signals
none
CLI tools1
@sang2x/captoolsCLI of CAP development tools for Cloud Foundry workflows
Signals
Functional boundary

Tasks3Beta

CoversCovers, under conditionsNot assessed
Pick up a CDS model change without restarting by hand1 under conditions

A developer edits a CDS file or a handler and the running service answers the next request against the changed model, without stopping and starting it.

Covers the loop between a saved file and a served request. Attaching a debugger to that process is debugging, and what the service is bound to while it runs is a separate outcome.

Covers, under conditionscom.sap.cds:cds-maven-pluginThe watch goal runs the CDS build and starts the application, and with Devtools on the project it takes advantage of their reload mechanism, where any change reloads the application context instead of restarting the whole application.

Conditions: Spring Boot Devtools are on the project, without which the goal performs a complete restart of the application after a CDS model change, which capire calls slower on Windows the watch goal only works if the Spring Boot Devtools are enabled

Remaining work: Add the Devtools dependency, and the plugin group com.sap.cds to ~/.m2/settings.xml for the short mvn cds:watch form. Devtools detects changes to .class files only, so a change to Java code is picked up once the build has produced them.

Open artifact →

Run a CAP service against a cloud service instance1 under conditions

A service running on a laptop reads and writes through a service instance that exists in the cloud — a database, a destination, an authentication service — instead of through the local substitute, with nothing deployed.

Covers how the local process comes to hold the instance's credentials and what kinds of instance can be reached. The network path to a system behind a firewall is connectivity rather than binding, and the router's login flow is its own outcome.

Covers, under conditions@sang2x/captoolsbind-local binds the local project to the services of a Cloud Foundry application and writes the resulting VCAP_SERVICES into default-env.json; run-local chains that behind one command with the install step and cds watch --profile hybrid.

Conditions: the target is a Cloud Foundry space with the application already deployed, since the command reads the bound services of an app the resolved VCAP_SERVICES may be written into default-env.json in the project

Remaining work: Keep the written file out of the repository, and read the published dist to know what a command does: there is no repository and no README.

Open artifact →

Start a CAP service with nothing bound1 covers

A CAP project whose model imports a remote service and whose endpoints are authenticated starts, serves and answers requests on a laptop with no service instance bound, no database provisioned and no upstream system reachable.

Covers what answers in place of the database, the identity provider and the imported service. Reaching a real instance of any of them from the same laptop is hybrid testing and is assessed separately, and what the router in front adds is its own outcome.

Coverscom.sap.cds:cds-maven-pluginThe watch goal runs the CDS build and starts the application, which is how a Java project gets from a checked-out model to a served endpoint without a deployment.

Remaining work: Add the plugin group com.sap.cds to ~/.m2/settings.xml for the short mvn cds:watch form, and generate the SQLite or H2 schema in the build where the local database needs one.

Open artifact →

Seen working3

ArtifactSignals
Samples3
cap-java-resilienceCAP Java service consuming a Business Partner API mocked in Node.js
No license
cap-java-snippetsTen short CAP Java references, one document per topic
none
ui5con24-dev-envpnpm workspace running CAP, a local launchpad and two UI5 apps
No license

Details

Coverage
Comparison properties3

These are the questions used to compare what the artifacts do. Values come from their documentation and may apply to a particular ecosystem or runtime. Each recorded value in the comparison opens its statement and sources.

Part of the local stack it startsBinds cloud servicesCredentials on disk
For your agent
Ref
capability:local-development
JSON
/capabilities/local-development.json
MCP
Connecting an agent