Build from source¶
Full reactor in 25–30 minutes, compile-only in 3–5. Works on Linux, macOS, Windows. Restricted-network friendly.
Prerequisites¶
- Java 21 — Temurin, Liberica, Corretto, or any 21 LTS distribution
- Maven 3.9+ — or use the bundled
./mvnwwrapper (no install required) - Docker — only required for the Kubernetes E2E gate
Verify your environment:
java -version # should report 21
./mvnw -v # should report Maven 3.9+
docker info # should connect to a running daemon
Standard build¶
This builds every module and runs every test, including the K8s E2E gate (kind cluster + Flink Operator + Kafka + LocalStack + real integration tests). Total: ~25–30 min on a developer laptop.
Faster iteration¶
Skips kind-cluster provisioning + integration tests. Keeps unit tests.
~5–7 min
Builds the named module and the modules it depends on (-am).
Restricted-network builds¶
Every Dockerfile and Kubernetes manifest in the build is parametric so you can pull base images through an internal registry mirror — no fork required.
The prefix is honoured by:
statefun-docker/src/main/docker/Dockerfile— the runtime distribution imagestatefun-e2e-tests/statefun-e2e-k8s-native/remote-function/Dockerfile— the test fixture imagekafka.yamlandlocalstack.yamlk8s manifests applied during E2E setup
Default empty pulls directly from Docker Hub — no behaviour change for the typical case.
Code formatting¶
The project enforces Google Java Format (2-space indent) via Spotless:
Run before committing — CI rejects formatting drift.
Contribution workflow¶
- Branch from
release(the active development branch). - Make changes; run
./mvnw spotless:applyand./mvnw -Dskip.k8s.e2e installlocally. - Open a PR against
release. CI runs the full K8s E2E gate, CodeQL, Scorecard, Trivy, and dep-convergence enforcer. - Merge via the merge queue once green.
PR target branch
PRs targeting master are not accepted. master is a vestigial Apache fork pointer; all development happens on release.
Troubleshooting¶
Build fails on enforcer:dependencyConvergence
Two paths bring different versions of the same artifact onto the classpath. Add a pin in the root pom's <dependencyManagement> — see existing pins for commons-lang3, jsr305, flink-shaded-netty as templates.
K8s E2E hangs on kind create cluster
Docker is out of disk or the daemon is unresponsive. Check df -h, docker system df, and consider docker system prune -af --volumes.
mvn verify reports ClassNotFoundException after rebuild
Stale .m2 cache after a versions:set or large refactor. Force a fresh resolve:
Next steps¶
- Quickstart — verify your build works against a live cluster.
- E2E test architecture — what the K8s gate exercises and why.
- Release process — how versions get cut and shipped.