Maven Migration Playbook ​
This page focuses on practical migration between build topologies.
Strategy ​
Move in small, testable increments:
- Keep current modular build green.
- Introduce runtime mapping (
validation: auto). - Change Maven modules to match target topology.
- Tighten mapping with
validation: strict.
Modular -> Pipeline Runtime ​
Target shape:
orchestrator-svcstays separate.- Pipeline services collapse into one runtime module.
- Plugin side effects can stay grouped by aspect runtime.
Typical Maven changes:
- Create one service runtime module (for grouped pipeline steps).
- Move or aggregate service step sources/deps into that module.
- Remove per-step service modules from parent
<modules>. - Keep
orchestrator-svcmodule as separate deployable.
In CSV Payments, the concrete migration assets currently implemented are:
examples/csv-payments/pom.pipeline-runtime.xmlexamples/csv-payments/pipeline-runtime-svc/pom.xmlexamples/csv-payments/build-pipeline-runtime.sh
The helper scripts (build-pipeline-runtime.sh and commands that invoke ./mvnw) require a Unix-like shell. Run them on Linux, macOS, or WSL; native Windows shells are not supported for these scripts.
Typical runtime mapping changes:
layout: pipeline-runtime- Default regular steps to the grouped service module.
- Default synthetics to plugin module(s).
Pipeline Runtime -> Monolith ​
Target shape:
- One runtime containing orchestrator, steps, and plugins.
Typical Maven changes:
- Create a monolith module containing orchestrator + service + plugin runtime deps.
- Build one runnable artifact from that module.
- Keep old modules only as migration scaffolding/test harness if needed.
Typical runtime mapping changes:
layout: monolithdefaults.moduleto monolith module.defaults.synthetic.moduleto same monolith module.
Command style ​
Prefer explicit flags/scripts over profiles for clarity. Example pattern:
bash
./examples/csv-payments/build-pipeline-runtime.sh -DskipTests
./mvnw -f examples/csv-payments/pom.pipeline-runtime.xml -pl orchestrator-svc \
-Dcsv.runtime.layout=pipeline-runtime -Dtest=PipelineRuntimeTopologyTest testValidation checklist after each migration step ​
- Build succeeds from clean checkout.
- Orchestrator E2E still passes.
- Runtime mapping warnings/errors are understood.
- Health checks reflect intended topology.
- CI runs the topology lane you intend to support.