Skip to content
Build 9234610

5. Run, Build & Test Locally

Prerequisites

  • Java 21 (Temurin). Check with java -version.
  • That's it — no global Maven. Every service ships a wrapper: ./mvnw.

Run a service

cd cm-order-prc
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
  • First run downloads dependencies (~2–3 min); later boots take a couple seconds.
  • Environments are dev / qa / stage / prod (prod you won't run locally).

The dev profile connects to the real nonprod Azure Service Bus

You're on shared infrastructure — messages you publish are real nonprod messages. Don't fire test payloads without knowing who consumes them.

Build & test

./mvnw clean package        # compile + unit tests + Checkstyle  (the full gate)
./mvnw test                 # tests only
./mvnw checkstyle:check     # style only

Checkstyle uses the Google baseline with 4-space indentation. Style violations fail the build — CI runs the same gate, so run it before you push.

Poke a running service

List / control its routes (locally or against a deployed pod):

curl localhost:8080/actuator/camelroutes
curl -X POST localhost:8080/actuator/camelroutes/{routeId}/stop

Call a deployed nonprod service through APIM:

curl -s "https://integration-nonprod.popsockets.com/dev/cm-<service>/<endpoint>" \
  -H "Ocp-Apim-Subscription-Key: <apim-subscription-key>" \
  -u "<basic-user>:<basic-pass>"

(Credentials live outside the repo — ask the team for the nonprod subscription key and basic-auth creds. The per-env base URLs are in the Endpoint & Environment Map.)

Read the logs

Logs are structured JSON shipped to Datadog. Service names follow the pattern popint-cm-<service>-int-<env> (e.g. popint-cm-order-prc-int-dev). Search by the message text — that's the reliable field.