Production Capstone: Build, Test, Secure, Publish, and Optimize a Multi-Module JVM Platform: Final Operational Review and Handoff
Perform the final operational review and hand off the build platform as an auditable operating model. Prove critical invariants, close the failure drills, inventory evidence and residual risks, document runbooks and upgrade boundaries, and make an explicit production-readiness decision.
Learning objectives
- Execute the final readiness review against independently provable invariants.
- Assemble an operational handoff package rather than leaving knowledge in build scripts alone.
- Close at least four cross-domain failure drills with root-cause and recovery evidence.
- Document cache, publication, CI, Maven interoperability, and upgrade contracts.
- Separate demonstrated readiness from simulated/environment-specific production integrations.
Final review standard. Do not mark an invariant “passed” because a previous lesson described the expected result. Re-run or inspect the independent evidence in your environment. Items that cannot be executed must be marked simulated/unverified, with an owner and next action.
1. Final checkpoint scenario
You are handing Orbit to another build/release team. They must be able to reproduce the accepted build, understand dependency and repository policy, locate test evidence, verify the published artifact, promote without rebuilding, diagnose common failures, consume the library from Maven, and remove every disposable state directory without touching normal user caches.
The handoff is accepted only when the evidence package can answer “what source?”, “what tools?”, “what dependencies?”, “what tests?”, “what bytes?”, “what repository?”, “what cache trust?”, “what promotion?”, and “what recovery procedure?” without relying on institutional memory.
2. Final preflight and environment record
Capture tool identity before the final run:
mkdir -p evidence/final
java -version 2>&1 | tee evidence/final/java-version.txt
javac -version 2>&1 | tee evidence/final/javac-version.txt
./gradlew -version | tee evidence/final/gradle-version.txt
sha256sum gradle/wrapper/gradle-wrapper.jar | tee evidence/final/gradle-wrapper-jar.sha256
cat gradle/wrapper/gradle-wrapper.properties > evidence/final/gradle-wrapper.properties
git status --short 2>/dev/null | tee evidence/final/git-status.txt || true
If Maven consumer verification is part of this execution
environment, also capture ./mvnw -version from
maven-consumer. If Maven is unavailable, mark I-11
environment-specific rather than fabricating success.
3. Prove at least six critical invariants independently
The prompt minimum is six; a production-style handoff should attempt all eleven:
| Invariant | Final command/evidence | Pass condition |
|---|---|---|
| I-01 |
Wrapper properties/JAR SHA + ./gradlew -version
|
Exact Gradle 9.7.1 integrity values; JDK 21 recorded. |
| I-02 | javap -verbose on core/app classes |
Major version 61. |
| I-03 | platform/catalog/lock + dependencyInsight | No unexplained external version selection. |
| I-04 | clean check + XML report inventory |
Unit and integration suites present, nonzero, passing. |
| I-05 | fresh source copy + isolated Gradle User Home | Build succeeds without hidden normal-user state. |
| I-06 | two clean source paths + SHA-256 | Core JAR hashes identical. |
| I-07 | settings + verification metadata + controlled refresh | Only intended repo policy; verification passes reviewed bytes. |
| I-08 | source/evidence secret scan | No real credentials/keys committed or printed. |
| I-09 | stage/release SHA equality | Promoted bytes equal accepted staged bytes; no rebuild in promotion. |
| I-10 | CI/cache contract review | Trusted writers/readers separated; build outputs not masquerading as dependency cache. |
| I-11 | clean Maven Wrapper consumer | Maven 3.9.16 consumer resolves/compiles promoted core. |
4. Run the final build/test/package evidence gate
Use a project-local user home and preserve outputs:
export GRADLE_USER_HOME="$PWD/.final-gradle"
./gradlew clean check --info | tee evidence/final/clean-check.log
./gradlew :core:dependencyInsight \
--dependency org.apache.commons:commons-lang3 \
--configuration runtimeClasspath \
| tee evidence/final/core-dependency-insight.txt
find core/build/test-results app/build/test-results -name 'TEST-*.xml' -print \
| sort | tee evidence/final/test-report-files.txt
javap -verbose core/build/classes/java/main/dev/academy/capstone/MessageNormalizer.class \
| grep 'major version' | tee evidence/final/core-bytecode.txt
A green exit code is insufficient if
test-report-files.txt lacks the integration suite or if
bytecode/tool identity is wrong.
5. Final publication and immutable promotion review
Rebuild the candidate only in the build/stage lane, capture the accepted checksum, and then promote by copy:
rm -rf staging-repo release-repo
./gradlew :platform:publishPlatformPublicationToStagingRepository \
:core:publishCorePublicationToStagingRepository
stage="staging-repo/dev/academy/capstone/core/1.0.0/core-1.0.0.jar"
sha256sum "$stage" | tee evidence/final/staged-core.sha256
mkdir -p release-repo/dev/academy
cp -a staging-repo/dev/academy/capstone release-repo/dev/academy/
release="release-repo/dev/academy/capstone/core/1.0.0/core-1.0.0.jar"
sha256sum "$release" | tee evidence/final/release-core.sha256
test "$(sha256sum "$stage" | awk '{print $1}')" = \
"$(sha256sum "$release" | awk '{print $1}')"
Inspect the published POM and module metadata and retain them with the evidence package. In a real repository manager, staging/promotion APIs replace filesystem copy, but the invariant remains: promotion changes repository state/visibility, not artifact bytes.
6. Close at least four controlled failure drills
Complete one drill from each required domain and optionally the cache/credential additions:
| Domain | Required drill | Evidence to retain | Close condition |
|---|---|---|---|
| Toolchain/configuration | Invalid Java release/toolchain | Compiler failure + restored major 61 | Clean compile/check passes. |
| Dependency/supply chain | Verification checksum mismatch | Verification failure + metadata diff | Reviewed metadata restored; controlled refresh passes. |
| Tests/execution | Integration suite disconnected | False-green log + absent report/dry-run | Wiring restored; integration report present. |
| Artifact/CI | Staged JAR tamper / promotion mismatch | Accepted vs actual SHA | Promotion blocked; exact accepted artifact restored. |
| Cache (recommended) | Warm vs isolated state comparison | Task outcomes + artifact hash | No unexplained semantic difference. |
| Credentials (recommended) | Fake credential containment | Detection/removal log | Fake value removed; real-world rotation steps documented. |
7. Assemble the handoff package
Create a folder that contains human-readable policy plus machine evidence. A useful minimum:
handoff/
architecture.md # compound diagrams + arrow explanations
versions-toolchains.md # Gradle/JDK/Java/Maven baseline and upgrade rule
dependency-governance.md # platform/catalog/locks/verification/repository policy
build-test-commands.md # clean build, unit/integration, report locations
cache-policy.md # allowed state, keys, writers/readers, clean-room exception
publication-promotion.md # coordinates, staging/release, exact-byte rule
ci-contract.yaml # provider-neutral ephemeral-agent contract
troubleshooting-runbook.md # diagnostic sequence + drills
upgrade-migration-notes.md # Gradle/Maven/JDK/plugin/dependency compatibility policy
risk-register.md # residual risks, owner, next action
cleanup.md # only disposable state
evidence/
source-files.sha256
wrapper-and-jdk/
dependency-and-verification/
test-reports/
artifact-checksums/
publication-metadata/
performance-baseline/
failure-drills/
The handoff package is not another cache. It contains policy and evidence sufficient to reproduce or audit the build; large disposable dependency/build caches can be deleted.
8. Operational runbook: normal build, release, and incident paths
| Situation | First action | Required evidence | Do not |
|---|---|---|---|
| Normal CI build | Verify wrapper/JDK then clean required gate | tool identity + reports + graph | Trust a cached workspace blindly. |
| Release candidate | Stage once after accepted verification | source/test/dependency evidence + staged SHA | Rebuild in promotion. |
| Dependency upgrade | Review declaration/policy + regenerate intentional lock/verification diff | dependencyInsight + diff + tests | Blindly accept generated verification metadata. |
| Checksum incident | Freeze evidence and origin/configuration | requested coordinate, repo, cached hash, verification error | Disable verification or clear all caches first. |
| Test false green | Inspect task/lifecycle wiring and report inventory | dry-run/task graph + report paths | Assume green generic task means all suites ran. |
| Cache suspicion | Reproduce with isolated project-local state | warm vs clean outcome/artifact identity | Delete normal user caches. |
| Promotion mismatch | Stop publication visibility change | accepted vs candidate SHA | Rebuild and silently replace same immutable version. |
9. Upgrade and mixed-estate policy
Upgrade one axis at a time when practical: Wrapper/Gradle, build-runtime JDK, Java target, dependencies, testing stack, publication metadata, and Maven consumer baseline. Record compatibility/deprecation evidence and keep rollback artifacts until acceptance.
Maven 3.9.16 remains the production consumer baseline at generation time. Maven 4.0.0-rc-6 is pre-GA and therefore belongs in an optional compatibility lane, not the release gate. The Maven boundary should continue to consume the published contract; do not introduce a second full build unless there is an explicit ownership/release reason.
10. Residual risk register
| Risk | Status in disposable capstone | Production implication / next control |
|---|---|---|
| Hosted repository auth/immutability | Simulated by local file repos and overwrite refusal | Configure repository-manager roles, staging/immutability/retention; test with non-production credentials. |
| Signing key/HSM | Not required | Choose signing/provenance system, key custody/rotation and verification policy. |
| Remote shared build cache | Policy simulated | Authenticate transport; protected writer lane; poisoning detection/retention. |
| Hosted CI secrets/isolation | Provider-neutral contract only | Map to selected CI with ephemeral workers, masked/scoped secrets, artifact retention. |
| Vulnerability posture | Not established by dependency verification | Run organization-approved vulnerability/license analysis outside this build-integrity proof. |
| Cross-OS reproducibility | Not guaranteed by one OS fixture | Add supported OS/JDK matrix and compare exact artifacts or document expected differences. |
| Maven 4 compatibility | Preview only | Keep separate non-blocking compatibility lane until organizational GA policy changes. |
11. Production-readiness decision
Decision framework: Orbit’s build-engineering model is ready for handoff when the executed environment independently proves the required invariants and closes the required failure drills. This demonstrates controlled tool identity, Java compatibility, dependency governance, intended tests, clean-room behavior, artifact traceability, immutable local promotion, and the Maven consumer boundary.
Not automatically production-ready: hosted repository authentication, signing-key custody, remote-cache transport, CI-provider isolation/secrets, vulnerability management, organization-specific approvals, and cross-OS agent matrices remain environment-specific integrations. They must be marked as residual risks with owners and validation plans rather than silently inferred from the local lab.
12. Complete cleanup without touching normal caches
Preserve the handoff/evidence package first. Then delete only disposable capstone state:
rm -rf .lab-gradle .final-gradle .drill-gradle-fresh
rm -rf core/build app/build platform/build build
rm -rf maven-consumer/.m2-clean
rm -rf staging-repo release-repo
# From the parent directory, remove clean-room copies only after evidence is preserved:
# rm -rf orbit-clean-a orbit-clean-b
# Never use this capstone as a reason to delete normal ~/.gradle or ~/.m2.
If the workspace itself is disposable and the handoff package has been copied to an approved location, remove the entire workspace according to local policy.
13. What the completed course operating model now contains
The course has progressed from JVM/build fundamentals through Maven and Gradle models, dependency governance, testing, publishing, caches, performance, security, CI, migration, and finally an evidence-backed operating model. The transferable skill is not memorizing two CLIs. It is reasoning from declared model → resolved graph → execution plan → filesystem/repository state → artifact/evidence identity, then applying the least destructive correction when those layers disagree.
Knowledge check
A release JAR has the right version string but a different checksum from staging. Can it be promoted?
No. The immutable-promotion invariant is about exact bytes, not the version label. Investigate why the bytes changed.
CI reports check green but there is no
integration-test XML. What is the correct conclusion?
The verification gate is false green until task/lifecycle wiring and report evidence prove the intended suite actually ran.
A dependency checksum changes after a repository refresh. What should happen first?
Preserve the mismatch and investigate coordinate, origin, cached bytes and upstream change. Do not regenerate verification metadata merely to restore green.
Two clean builds have equal JAR SHA-256. Does that prove the dependency was non-malicious?
No. It proves reproducibility for the tested inputs/tooling; provenance/integrity and vulnerability/trust claims require separate controls.
Why can a cache hit be unsafe even with a perfect cache key?
The cached output may have been written by an untrusted lane or produced from a compromised tool/dependency state. Writer trust/provenance is part of cache acceptance.
What is the difference between Maven interoperability and maintaining a duplicate Maven build?
Interoperability tests the published Gradle artifact/metadata from a Maven consumer. A duplicate full build creates a second source-build authority and drift risk.
When is rebuilding from source preferable to restoring an already-built artifact?
When you need fresh verification/reproducibility from trusted source/tool inputs. For promotion of an already approved candidate, restoring/copying the exact accepted artifact preserves identity better.
Why is Maven 4 RC not the capstone production baseline?
It is still a release candidate/pre-GA at generation time; production remains Maven 3.9.16 while Maven 4 belongs in an explicitly preview compatibility lane.
Official references and version notes
- Gradle 9.7.1 release notes — pinned Gradle baseline for the capstone.
- Gradle Wrapper and release checksums — wrapper/distribution identity and integrity.
- Gradle JVM toolchains — build JVM versus compiler/test launchers.
- Dependency verification — checksum/signature verification metadata and review workflow.
- Repository declarations and content filtering — dependency origin controls.
- Java testing and JVM Test Suite — unit/integration verification model.
- Maven Publish — Gradle publication to Maven repository layout and clean Maven consumption.
- Build Cache and Configuration Cache — bounded build-state reuse.
- Gradle performance guidance — measurement-first optimization and profiling.
- Apache Maven release history — Maven 3.9.16 GA consumer baseline; Maven 4.0.0-rc-6 remains pre-GA.
- Apache Maven Wrapper 3.3.4 — stable Maven Wrapper baseline.
- Maven Compiler Plugin 3.15.0 — clean Maven consumer compilation baseline.
- JUnit 6.1.3 — Java 17+ test runtime baseline.
- Apache Commons Lang release notes — Commons Lang 3.20.0 dependency baseline.
Version-sensitive statements were rechecked against primary documentation on 2026-08-24. Mandatory work remains local/free. Hosted CI, commercial build analytics, production repository managers, remote caches, and real signing/credential systems are optional integration boundaries only.
Keep the academy open
Support free, practical DevOps education.
Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0
Send only Ethereum/ERC-20 compatible assets to this
address.