Build decisions

API review gate

Every published Java module runs apiCheck during check. It compares compiled declarations and JVM descriptors against reviewed api/*.api baselines using the Java 21 toolchain. See API compatibility for update commands, review policy and coverage limits.

Toolchain and dependencies

Axiom uses Gradle Kotlin DSL with Java 21 toolchains and --release 21, without preview features. The wrapper pins Gradle 9.8.2 and verifies its distribution checksum. Convention plugins share compilation, JUnit Platform, sources/Javadoc archives, and reproducible archive settings.

The version catalog contains only dependencies in use. HTTP uses Netty 4.2 with its BOM to align implementation modules. JSON uses jackson-databind 2.23 with the Jackson BOM, plus the jackson-datatype-jsr310 (java.time) and jackson-datatype-jdk8 (Optional) modules aligned by the same BOM, as implementation dependencies of axiom-json only; no Jackson type appears in an Axiom API, and applications add axiom-json with runtimeOnly. The 2.x line was chosen because its package names and exceptions are stable across the ecosystem; moving to Jackson 3 would only change axiom-json internals. Telemetry adapters are opt-in modules: axiom-otel depends on the OpenTelemetry API and axiom-metrics-micrometer on Micrometer; neither pulls an SDK or exporter into the starter. JPMS is later work; stress and cross-OS suites are diagnostic CI jobs. The BOM constrains all 16 published libraries: axiom-core, axiom-server, axiom-http, axiom-json, axiom-test, axiom-validation, axiom-validation-jakarta, axiom-security, axiom-security-jwt, axiom-metrics, axiom-openapi, axiom-openapi-ui, axiom-otel, axiom-metrics-micrometer, axiom-grpc and the starter.

Validation uses Hibernate Validator 9.1 (the Jakarta Validation 3.1 reference implementation, actively maintained, Java 17+, with container-element constraints and validation of record components) and jakarta.validation-api 3.1, both as implementation dependencies of axiom-validation-jakarta only. Applications declare jakarta.validation-api themselves to annotate their types; no Jakarta or Hibernate type appears in an Axiom API. Expression Language (jakarta.el) is deliberately not a dependency: the adapter never interpolates messages (see validation). Hibernate Validator brings jboss-logging and classmate transitively. The annotation-free axiom-validation module has no external dependencies. Both validation modules are published and constrained by the BOM, but the starter does not include them: validation is opt-in, so an application adds axiom-validation (or axiom-validation-jakarta, which brings it) next to the starter.

Module checks enforce dependency direction across production, annotation processor and test configurations, fail with a clear message for modules missing from the allowed-dependency table, and confine external production dependencies to the module that adapts them: Netty (io.netty) to axiom-http, Jackson (com.fasterxml.jackson*) to axiom-json, and nothing in core or server. The test client may not depend on axiom-json; tests send raw bodies. Public signature tests scan the exported core and test-client classes, including generic types, to reject implementation and third-party types. These run as part of check alongside behavior and lifecycle tests. Jakarta Validation and Hibernate Validator (jakarta.validation, org.hibernate.validator) are confined to axiom-validation-jakarta, which depends on axiom-validation, which depends on core only. Both validation modules may use axiom-test in test configurations only, for end-to-end tests; a signature test keeps provider types out of their public API. axiom-security depends on core only and axiom-security-jwt on axiom-security; neither may declare an external production dependency, so JWT parsing and signature verification use the JDK. Both may use axiom-test in test configurations only. They are published and constrained by the BOM but not part of the starter. axiom-metrics depends on core only, declares no external dependency (the registry and the Prometheus text renderer use the JDK) and may use axiom-test in test configurations only. The Metrics SPI itself lives in core. The two opt-in adapters keep the same shape: axiom-otel depends on core and confines io.opentelemetry to its API dependency (the SDK and testing exporter are test-only), and axiom-metrics-micrometer confines io.micrometer to its micrometer-core dependency. Both may use axiom-test in test configurations only, and neither is part of the starter. Their versions are pinned in gradle/libs.versions.toml and checksummed in gradle/verification-metadata.xml like every other external artifact. axiom-openapi depends on core and axiom-validation (to map rule sets to schema constraints), declares no external dependency (it writes JSON itself) and may use axiom-test and axiom-json in test configurations only, to compare generated schemas with the real codec. The route metadata it reads (RouteDoc) lives in core. axiom-openapi-ui depends on core only and, as its single external production dependency, on the org.webjars:swagger-ui WebJar (group org.webjars is confined to this module), which holds the static Swagger UI files that the module serves from memory; nothing is fetched from a CDN at run time. The version is pinned in gradle/libs.versions.toml, and the jar and its POM are checksummed in gradle/verification-metadata.xml (added with ./gradlew --write-verification-metadata sha256 :axiom-openapi-ui:test and reviewed against the published artifact).

axiom-grpc depends on core and confines grpc-java (io.grpc) and protobuf (com.google.protobuf) to its own implementation dependencies; gRPC’s shaded Netty never appears in an Axiom API. Generated services arrive as io.grpc.BindableService, and the adapter builds and owns the transport instead of duplicating grpc-java’s HTTP/2 implementation. gRPC runs on its own listener because the HTTP listener’s ALPN is http/1.1 while gRPC needs h2; the decision and its limits are documented in gRPC. Versions are pinned in gradle/libs.versions.toml and checksummed like every other external artifact. gRPC’s in-process server and channel are test-only dependencies, so no socket is opened by the unit tests.

Core discovers the default runtime through a JDK service provider. HTTP and test client consumers receive core through api. HTTP uses server through implementation for its protocol-neutral execution dispatcher; the test client uses it through implementation to admit requests through the same dispatcher. Neither exposes server on consumer compile classpaths. The server depends on core; core has no reverse dependency on the runtime.

checkPublicationCoverage (root project, part of check) compares three sets: the library modules that apply the publish convention, the project constraints in axiom-bom, and the keys of the allowed-dependency map in build-logic/.../ModuleBoundaries.kt (test-only modules excluded). Any difference fails the build and names the module and the file to update. To see it fire, remove a api(project(...)) line from axiom-bom/build.gradle.kts or a module from the map and run ./gradlew checkPublicationCoverage.

The checks themselves have JUnit tests in build-logic/src/test/kotlin (./gradlew :build-logic:test), and the root check runs them through the included build’s check. They cover the pure problems() function (agreement, a missing BOM entry, a missing boundary entry, a module present in only one set, the test-only exemption) and CheckModuleBoundaries.verify (allowed, forbidden, unlisted and test-only dependencies, and the external-dependency confinement rules).

Unit and integration tests

Tests are split into two Gradle tasks per module, both part of check:

  • test runs the fast tests: pure unit tests, Netty embedded channels and the in-memory TestClient. It opens no real socket.
  • integrationTest runs the test classes tagged @Tag("integration"): every class that opens a real socket or starts a live listener (ServerSocket, Socket, NettyServer.bind, app.listen, HttpClient). It exists only in modules that apply the axiom.integration-test convention: axiom-http, integration-tests, examples/readme and examples/rest-api, the data adapters (axiom-jdbc, axiom-jpa, axiom-jta) and examples/modules. It runs from the same test source set and classpath as test.

The data-adapter tests now use real providers instead of stand-ins: H2 2.3.232 with HikariCP 7.0.2 for axiom-jdbc, Hibernate ORM 7.4.16.Final with H2 for axiom-jpa, and Narayana JTA 7.3.4.Final (the lighter jta artifact) for axiom-jta. They are declared only in test, testImplementation or testRuntimeOnly configurations of those modules (and as example-only dependencies of examples/modules); no adapter publishes a provider and core remains JDK-only. Versions are pinned in gradle/libs.versions.toml and checksummed in gradle/verification-metadata.xml like every other external artifact. Each adapter’s integrationTest covers a live listener or an end-to-end scenario, and examples/modules runs the full stack against a live listener in ProductionServerExampleTest. Run them with ./gradlew integrationTest (all modules), or for one module ./gradlew :axiom-jdbc:integrationTest, :axiom-jpa:integrationTest, :axiom-jta:integrationTest and :examples:modules:integrationTest. Narayana’s tests point its object store at a JUnit temp directory per test and terminate the recovery manager afterwards.

The tag is set per class, so a class that mixes embedded-channel and live-listener cases cannot be split by tag. Such classes are kept in two: HttpLingerTest and HttpPipelineErrorTest hold the embedded cases and run in test; HttpLingerLiveTest and HttpPipelineErrorLiveTest hold the cases that bind a listener and connect a raw socket and run in integrationTest. NettyServerTest stays whole in integrationTest: every one of its cases binds a real listener (it only feeds embedded channels to it). The integration-tests module is integration as a whole: its integrationTest runs every class there, including the TestClient half of the JSON contract, and its test task is disabled. A module whose tests carry the tag without applying axiom.integration-test fails check (checkIntegrationTags) instead of silently running those tests nowhere.

axiom-http also has integrationTestNative and integrationTestIoUring, both part of check: the same tagged classes with the Netty native transport of the build platform (epoll on Linux x86_64 and aarch64, kqueue on macOS) added to the class path, where the default AUTO transport must pick it, and with io_uring alone on Linux, where AUTO must select IO_URING. On Linux the first task also adds io_uring so its explicit cases run. integrationTest itself has no native library, so it covers NIO. The native tasks are skipped on platforms without a matching library, and the native cases of TransportSelectionTest skip where the library cannot load, unless -Daxiom.requireNativeTransport=true is passed, which makes both a failure; see native transports. The native libraries are not dependencies of the published axiom-http; the build resolves them in nativeTransport and ioUringTransport configurations used only by those tasks, and gradle/verification-metadata.xml holds the checksums of their jars (epoll and kqueue for x86_64 and aarch64, io_uring for x86_64, aarch64 and riscv64) and POMs, plus the compile-time transport-classes jars. CI adds a dedicated native-io-uring job on Linux that requires and verifies io_uring (see Continuous integration): both the Gradle flag and the XML assertion make an unusable io_uring fail the check aggregate instead of skipping silently.

TLS tests (TlsListenerTest) generate their certificates with the JDK’s own keytool from java.home and write the PEM files themselves, so they need a JDK rather than a JRE and no third-party library; each test removes its temporary directory.

The root project has two aggregates: ./gradlew unitTest runs every module’s test, and ./gradlew integrationTest runs every module’s integrationTest. A single module runs as ./gradlew :axiom-http:test or ./gradlew :axiom-http:integrationTest.

Test classes / tests per task, counted from the JUnit reports of ./gradlew clean check:

Module test integrationTest
axiom-core 27 / 400 -
axiom-server 39 / 399 -
axiom-http 8 / 113 21 / 243
axiom-json 2 / 74 -
axiom-test 15 / 95 -
axiom-validation 6 / 37 -
axiom-validation-jakarta 3 / 19 -
axiom-security 10 / 244 -
axiom-security-jwt 6 / 70 -
axiom-metrics 2 / 18 -
axiom-otel 2 / 6 -
axiom-metrics-micrometer 1 / 2 -
axiom-jdbc 1 / 10 1 / 2
axiom-jpa 1 / 14 1 / 1
axiom-jta 2 / 10 1 / 2
integration-tests disabled 13 / 89
examples/readme 2 / 6 2 / 10
examples/rest-api 1 / 3 1 / 1
examples/modules 8 / 8 1 / 1
total 136 / 1528 41 / 349

build-logic has its own test task (2 / 20) that the root check runs through the included build. The counts above predate the fuzz targets: each of the four adds one test class to its module’s test task and replays the empty input plus its committed seed files in regression mode (seven invocations each at the time of writing). No fuzz test runs in integrationTest.

Fuzzing

Four coverage-guided Jazzer targets cover the protocol parsers. Each is a JUnit @FuzzTest in the module’s normal test source, takes a FuzzedDataProvider, and is part of that module’s test task in regression mode:

Module Target Safety invariant
axiom-core com.jsgalactic.axiom.http.RequestFuzzTest.fuzzRawPaths A fuzzed method, path, query and request target either builds a request (and its path(), query(name) and route-template accessors work) or throws IllegalArgumentException/InvalidRequestPathException, never another exception.
axiom-http com.jsgalactic.axiom.http.internal.HttpParsersFuzzTest.fuzzHttpParsers Fuzzed bytes drive RequestDecoder through an EmbeddedChannel: no failure escapes the connection’s exception boundary, the channel releases the input and its decoded slices, and RequestTargets.originForm returns a target or throws only IllegalArgumentException.
axiom-json com.jsgalactic.axiom.json.internal.JacksonBodyCodecFuzzTest.fuzzJsonDecode decode(bytes, Map.class) and decode(bytes, Item.class) return a bounded value or throw DecodeException; no Jackson or I/O failure leaks, and an 8 KiB input cap bounds allocations even near the codec’s limits.
axiom-security-jwt com.jsgalactic.axiom.security.jwt.JwtFuzzTest.fuzzJwtParsers Json.parseObject throws only IllegalArgumentException for malformed JOSE JSON; JwtAuthenticator.authenticate answers with empty credentials or a 401 invalid_token, never another exception, and no token text appears in exception messages.

Jazzer 0.30.0 is pinned in gradle/libs.versions.toml and checksummed in gradle/verification-metadata.xml. jazzer-junit (which brings FuzzedDataProvider, the agent and the JUnit extension) is test-only in these four modules; it is not published and cannot reach a consumer’s classpath. Jazzer’s published JUnit baseline is 5.9, but its @FuzzTest uses only Jupiter/Platform APIs that are still present in JUnit 6.1.3: both regression mode and fuzzing mode were verified on the project’s JUnit 6 runtime, so no module downgrades JUnit and no separate source set is needed.

Regression mode (./gradlew test, part of ./gradlew check) runs each target on the empty input and on every file in its committed seed corpus. It is fast and deterministic and needs no environment variable.

Fuzzing mode runs one target per module JVM with a fixed seed and hard bounds:

./gradlew fuzz                       # root aggregate: all four targets
./gradlew :axiom-http:fuzz           # one module

The axiom.fuzz convention sets JAZZER_FUZZ=1 and passes libFuzzer -seed=20261128 -runs=10000 -max_total_time=60 -timeout=10 -max_len=8192, so a default CI run terminates within one minute per target whichever bound is reached first. The first three flags are overridable with the Gradle properties axiom.fuzz.seed, axiom.fuzz.runs and axiom.fuzz.seconds; each must be a positive integer or configuration fails with a clear message. For example, ./gradlew fuzz -Paxiom.fuzz.runs=200000 -Paxiom.fuzz.seconds=300 extends every target while keeping the fixed seed. fuzz is deliberately not part of check; a finding makes the task fail and the CI job uploads the generated inputs.

Seed corpora live in src/test/resources/<package>/<TestClass>Inputs/<method>/ (for example axiom-json/src/test/resources/com/jsgalactic/axiom/json/internal/JacksonBodyCodecFuzzTestInputs/fuzzJsonDecode/) and contain valid and invalid examples: CRLF request lines, chunked bodies, malformed percent escapes, duplicate keys, deep nesting, malformed UTF-8 and non-canonical base64url. Jazzer writes a new finding to that same inputs directory and its generated corpus to .cifuzz-corpus/<package>.<TestClass>/<method>/; the latter is ignored by Git. Both directory patterns are marked binary in .gitattributes so Windows checkouts cannot change a seed. After a finding, commit the crashing input as a seed and add a named regression test in the module’s ordinary test suite that asserts the fixed behavior. Re-running ./gradlew fuzz with the fixed seed and committed corpus reproduces it.

The Build workflow has a separate fuzz job (15-minute timeout) that runs ./gradlew fuzz --rerun-tasks --no-build-cache with the defaults. It needs no secret, blocks the check aggregate, and also runs on a weekly cron and on workflow_dispatch.

A separate fuzz-campaign job (60-minute timeout) runs only on schedule or workflow_dispatch: ./gradlew fuzz --rerun-tasks --no-build-cache -Paxiom.fuzz.runs=200000 -Paxiom.fuzz.seconds=300 with the fixed seed. It is exploratory and is not part of check, so it cannot block a pull request. It uploads the generated .cifuzz-corpus/** and any *FuzzTestInputs/** crash inputs as fuzz-campaign-evidence with 30-day retention, even when a crash stops the run; fetch the artifact from the corresponding scheduled or manually triggered workflow run. A finding requires triage: commit the crashing input as a seed and add a named regression test that asserts the fixed behavior.

Coverage

The axiom.java-test convention applies the Gradle jacoco plugin with the JaCoCo version pinned in the version catalog (jacoco). The agent is attached to a test task (test and integrationTest) when the requested build contains a JaCoCo report task (coverageReport, a module’s jacocoTestReport, testCodeCoverageReport and so on) or when -Daxiom.collectCoverage=true is passed; either way the task writes build/jacoco/<task>.exec in its module. Plain check, test, unitTest and integrationTest runs (local and the per-commit job) carry no agent, so timing- and allocation-sensitive tests are not instrumented. Decision: the agent is a coverage-only concern. Test tasks are cached separately with and without the agent, so a coverage run executes the tests once under the agent even when the same tests passed without it.

CI passes -Daxiom.collectCoverage=true in the unit and integration jobs and uploads each module’s .exec file. The quality job downloads those artifacts into their module directories and runs aggregateCoverage, which builds the report from the files without running any test. Local coverageReport still runs the tests itself; both tasks write the same XML counters from the same execution data.

  • Per module: ./gradlew :axiom-http:jacocoTestReport runs the module’s test tasks and writes build/reports/jacoco/test/html/ and build/reports/jacoco/test/jacocoTestReport.xml from the execution data of both. It covers the module’s classes with the module’s own tests only.
  • Aggregated: ./gradlew coverageReport (root) runs the tests it needs, writes every per-module report, and writes build/reports/jacoco/coverageReport/html/ and build/reports/jacoco/coverageReport/coverageReport.xml. The root applies Gradle’s jacoco-report-aggregation plugin over all library modules and integration-tests, so a class is covered by any test of any of them (for example, codec classes exercised by integration-tests). The axiom.integration-test convention publishes the integrationTest execution data as a variant with the test suite name integrationTest; the root merges the test and integrationTest aggregates (also available on their own as testCodeCoverageReport and integrationTestCodeCoverageReport). The BOM has no code; examples and benchmarks are not library code and are not aggregated.
  • From supplied data: ./gradlew aggregateCoverage (root) reads every */build/jacoco/*.exec and writes build/reports/jacoco/aggregateCoverage/html/ and build/reports/jacoco/aggregateCoverage/aggregateCoverage.xml without running any tests. CI uses this task after downloading the execution data from its test jobs.

Examples are deliberately not in the coverage report: they are usage samples, not shipped code, and including them would dilute the numbers of the libraries without testing more of them. Their own tests (TestClient cases in test, live-listener cases in integrationTest) still run in check.

No class is excluded from coverage. Coverage is reported, not enforced: there is no minimum yet. Per-module floors will be introduced later, starting from the baseline below, and then raised.

Baseline, measured on 2026-10-03 with JaCoCo 0.8.15 by ./gradlew coverageReport on the commit that introduced coverage (parent bf8e50b), as covered lines and branches:

Module Line, aggregated Branch, aggregated Line, own tests Branch, own tests
axiom-core 92.8% (544/586) 89.5% (418/467) 87.4% (512/586) 88.4% (413/467)
axiom-server 97.3% (695/714) 89.4% (454/508) 96.9% (692/714) 88.4% (449/508)
axiom-http 98.2% (389/396) 83.9% (292/348) 98.2% (389/396) 83.9% (292/348)
axiom-json 94.0% (142/151) 81.2% (69/85) 94.0% (142/151) 81.2% (69/85)
axiom-test 93.8% (45/48) 70.0% (14/20) 93.8% (45/48) 70.0% (14/20)
axiom-validation 97.6% (248/254) 91.1% (224/246) 97.6% (248/254) 91.1% (224/246)
axiom-validation-jakarta 90.7% (78/86) 73.9% (65/88) 90.7% (78/86) 73.9% (65/88)
total 95.8% (2141/2235) 87.2% (1536/1762)    

“Aggregated” is the module’s share of coverageReport (all tests of all aggregated modules); “own tests” is the module’s jacocoTestReport. axiom-starter has no classes. Of the total, test alone covers 90.7% of lines and 81.8% of branches, integrationTest alone 68.3% and 54.6%.

Code style

Use imports and simple Java type names in implementation and test code. Checkstyle rejects unnecessary inline qualification, including static calls, annotations and nested types. Exact exceptions cover the same-name Axiom and Jakarta Validator types that Java requires us to disambiguate. Strings containing runtime class names and the generated API signature files keep their qualified names.

Spotless and Checkstyle are applied to every Java module by the axiom.java-base convention plugin. spotlessCheck, checkstyleMain and checkstyleTest are part of each module’s check and fail the build on any violation; run ./gradlew spotlessApply to format and ./gradlew :axiom-core:checkstyleMain :axiom-core:checkstyleTest to check one module. Spotless uses google-java-format (version in gradle/libs.versions.toml); the JMH source set is formatted explicitly because it is not a default Java source set. The shared ruleset is Google’s official config/checkstyle/google_checks.xml, with checks that duplicate the formatter or conflict with default-package README examples removed, plus Axiom’s rule that a method body must not be written on one line. The ruleset encodes: no tabs, trailing whitespace or star imports, a final newline, no unused or redundant imports, imports in one ASCII-sorted block with static imports first, 4-space indentation, lines of at most 200 characters, standard naming, final classes without a visible constructor (or a hidden one for utility classes), required braces for multi-line statements, one annotation per line above a method or constructor, method bodies on their own lines rather than a single line, and Javadoc on every public type and method of library main sources. Tests, examples and benchmarks are exempt from the Javadoc rule, and the README examples from the utility-class rule, by filters inside the ruleset itself; there is no separate suppression file. Add style rules with the source cleanup needed to pass them. The Checkstyle dependencies have checksums in gradle/verification-metadata.xml like every other tool dependency.

README examples

The README’s Hello world, tasks API and TestClient snippet are quoted from compiled sources in examples/readme (Hello.java, TasksApi.java, and the tested region of TasksApiTest.java). TasksApiTest runs the snippet through TestClient; TasksApiLiveTest (tagged integration) starts TasksApi on a real socket (on an ephemeral port: its main binds 8080). A README block is tied to its source by a marker line directly before the fence:

<!-- snippet: examples/readme/src/main/java/TasksApi.java -->
<!-- snippet: examples/readme/src/test/java/TasksApiTest.java#tested -->

The first form quotes a whole file; the second the lines between // region tested and // endregion tested, dedented. The root checkReadmeSnippets task (part of check) fails, naming the README line, when a block differs from its source, the source or region is missing, or no marker exists at all. Its logic has unit tests in build-logic. To change an example, edit the source and copy it into the README.

Allocation-based tests

The no-copy tests measure allocation per thread through com.sun.management.ThreadMXBean and are skipped (JUnit assumption) on a JVM that cannot measure it. Passing -Daxiom.requireAllocationTests=true to Gradle turns that skip into a failure; the Build workflow sets it, and the axiom.java-test convention forwards it to every test JVM (test and integrationTest alike). Locally it is off by default so a different JDK does not break check. Every allocation-based test honors the flag, so none of them can be skipped (or pass vacuously) in CI: the axiom-json read-only-view test, the axiom-server CodecViewTest case and the axiom-http HttpConnectionTest allocation case. The unit, integration, quality and per-commit jobs pass the flag on Temurin 21, which supports the measurement.

Hygiene and deferred items

Compilation runs with -Xlint:all -Werror; the build is warning-free. Archives ignore file timestamps, use a stable entry order and normalized permissions, and Javadoc omits its generation timestamp, so repeated builds produce identical jars.

axiom-json provides the JSON codec as a BodyCodec service; it has no public API package. Its tests exercise the codec directly.

GitHub Actions are pinned to full commit SHAs with the version in a trailing comment (uses: actions/checkout@<sha> # v7). The SHAs were read from the upstream repositories with git ls-remote --tags (for annotated tags, the commit the tag points at). Dependabot (.github/dependabot.yml) proposes weekly updates for Actions and Gradle dependencies, grouped by family (Netty, Jackson, validation, test tools), and keeps the pins current.

Starter artifact

axiom-starter is published as com.jsgalactic.axiom:axiom. It has api on axiom-core and runtimeOnly on axiom-http, axiom-server and axiom-json, so one dependency is enough to compile a Hello World or a JSON API and to run it. The jar itself is empty apart from the manifest; sources and Javadoc jars contain only META-INF/. Central permits placeholder classifier jars and does not evaluate their contents, so this is not a release blocker; see Releasing.

Facts from ./gradlew :axiom-starter:dependencies --configuration runtimeClasspath at 0.1.0-SNAPSHOT (Netty 4.2.20.Final, Jackson 2.23.0):

  • Compile classpath of a consumer: axiom, axiom-core.
  • Runtime classpath: 19 jars. 5 are Axiom (axiom, axiom-core, axiom-http, axiom-server, axiom-json), 9 are Netty (common, buffer, transport, resolver, codec-base, codec-compression, codec-http, handler, transport-native-unix-common) and 5 are Jackson (databind, core, annotations, datatype-jsr310, datatype-jdk8). Exact jar bytes change with each dependency release and are recorded in the checked-in verification metadata, not pinned in this guide.
  • No other libraries (logging, annotation, validation or test libraries) are on the runtime classpath. The validation, OpenAPI, security, metrics and telemetry modules are deliberately not part of the starter.

Publication

Every library module applies the axiom.publish convention (through axiom.java-library); the BOM applies it directly. Each publishes a binary jar, a sources jar, a Javadoc jar, a POM (name, description, URL, Apache-2.0 license, SCM, issue tracker, developer) and Gradle module metadata. The BOM is a java-platform that constrains the 20 published library modules. Archives stay reproducible.

Targets: build/compat-repo (a file repository used by the compatibility tests) and, only when axiom.publish.url is given, one remote repository whose credentials come from axiom.publish.username and axiom.publish.password. Signing is configured only when the signingInMemoryKey property (optionally signingInMemoryKeyId and signingInMemoryKeyPassword) is present, normally through ORG_GRADLE_PROJECT_* environment variables, so builds without keys are unaffected. With -Paxiom.release=true, publishing to the remote target fails while the axiom.pom.* placeholders in gradle.properties remain or no signing key is set. Signing was exercised once locally with a throwaway key (signature files were produced); it has not been exercised with a real key. Generating the real key and storing it as CI secrets does not publish the public key to a keyserver; see Releasing.

Consumer compatibility

./gradlew compatibilityTest publishes all modules into build/compat-repo and builds the projects in compatibility/: a Gradle Kotlin DSL consumer that imports the BOM and uses the unversioned starter, a Gradle Groovy DSL consumer that uses the starter with an explicit version, and a Maven consumer that imports the BOM. Each compiles and runs compatibility/shared/consumer/Smoke.java, which serves a plain route and a JSON route over HTTP. The Kotlin consumer also checks that the compile classpath holds only axiom and axiom-core, that Netty and Jackson are on the runtime classpath, and that the starter was resolved from Gradle module metadata. The Kotlin consumer also depends on axiom-validation, axiom-validation-jakarta (versions from the BOM) and jakarta.validation-api, and runs compatibility/shared-validation/consumer/ValidationSmoke.java and JakartaSmoke.java: each starts the application and checks, over HTTP, a valid request (201) and an invalid one (422 with only field paths and codes, no echoed input). This checks the publication metadata of both validation modules from a consumer’s point of view. The Groovy and Maven consumers do not use the validation modules. On Windows, the consumer tasks use gradlew.bat and mvn.cmd; other platforms use gradlew and mvn. The Maven task is skipped when its platform launcher is not on the path. The task is not part of check; the Compatibility workflow and the release workflow run it.

Dependency verification

gradle/verification-metadata.xml holds SHA-256 checksums for every external artifact resolved by the main build and by build-logic (including Gradle plugins), generated with:

./gradlew --write-verification-metadata sha256 clean check coverageReport \
    publishAllPublicationsToCompatRepository --rerun-tasks --no-build-cache --no-configuration-cache

A fresh local run can record only the Gradle module file (.module) of a component while a CI runner also resolves its .pom, which then fails verification. After generating, run

python3 .github/scripts/verify-pom-checksums.py --fix gradle/verification-metadata.xml compatibility/*/gradle/verification-metadata.xml

which downloads the .pom of every component that has a .module but no .pom entry from Maven Central (then the Gradle plugin portal), retries HTTP 429 with a growing pause and inserts the SHA-256. Without --fix it only reports and exits 1; the build job runs it that way. Re-creating the committed POM entries with the script (after removing them) gave back exactly the entries Gradle had written.

Run the generation with an empty Gradle home (GRADLE_USER_HOME pointing at a new directory), so every artifact is downloaded and checksummed rather than taken from a cache. coverageReport is included because the JaCoCo agent, report and aggregation configurations are resolved only when coverage runs.

The checksums were taken from the repositories as served at generation time and are trust-on-first-use; signature verification is off. A modified checksum makes the build fail.

The Gradle consumers in compatibility/ are standalone builds, each with its own gradle/verification-metadata.xml. Artifacts in group com.jsgalactic.axiom are trusted (<trusted-artifacts>) because they come from the locally published repository and change with every build; every other artifact, including POMs and module files, is checksummed. Regenerate a consumer’s file from an empty Gradle home, so every artifact is downloaded and nothing is taken from a stale cache. Seed the file with the <trusted-artifacts> block, publish with ./gradlew publishCompatRepo, then in the consumer directory run:

../../gradlew -g "$(mktemp -d)" --no-daemon -PaxiomRepo=file://$PWD/../../build/compat-repo/ \
    -PaxiomVersion=0.1.0-SNAPSHOT --write-verification-metadata sha256 compatibilityCheck

Maven Central may answer HTTP 429 when many artifacts are fetched at once. Retry the whole command a bounded number of times with a growing pause, and restore the seed file if all attempts fail; never commit a half-written file. Regenerate the consumers in the same commit as a change to their dependencies, and when the Jakarta Validation or Hibernate Validator versions change.

The Maven consumer has no committed verification metadata. The compatibility task runs mvn --strict-checksums, which fails when a downloaded file does not match the checksum the repository publishes. That detects corrupted or inconsistent downloads but, unlike committed metadata, not a change of content that is published together with its checksum.

Dependency locking was evaluated again and is still not enabled: versions are already exact through the catalog and the Netty and Jackson BOMs (consumers declare fixed versions or import the BOM), and checksums pin the contents. Locking would add lock files to regenerate with every update without catching anything the checksums do not; revisit it if dynamic versions or version ranges are ever introduced.

Continuous integration

The Build workflow (.github/workflows/build.yml, contents: read) runs on pushes to main, on pull requests, on a weekly cron (37 3 * * 1) and on workflow_dispatch; no secret is used. A new push to a pull request cancels the run for its previous head; runs on main, scheduled runs and manual runs are never cancelled. Jobs run in parallel, each on a fresh runner with the Gradle cache of gradle/actions/setup-gradle:

Job Runs Timeout
build ./gradlew assemble testClasses javadoc check -x test -x integrationTest: compilation (main, test and benchmark sources), jars, Javadoc, architectureTest, checkstyleMain and checkstyleTest of every module, checkPublicationCoverage, checkIntegrationTags, the benchmark harness compile and dependency verification of everything it resolves 20 min
matrix ./gradlew -q unitTestMatrix: prints the modules that have unit tests as the unit job’s matrix 10 min
unit ./gradlew <module>:test -Daxiom.requireAllocationTests=true -Daxiom.collectCoverage=true, one job per module listed by matrix; uploads the module’s test report on failure and its test.exec as jacoco-unit-<module> 20 min
integration ./gradlew integrationTest -Daxiom.requireAllocationTests=true -Daxiom.collectCoverage=true (axiom-http, integration-tests, examples/rest-api); uploads the test reports on failure and all integrationTest.exec files as jacoco-integration 30 min
fuzz ./gradlew fuzz --rerun-tasks --no-build-cache: the four Jazzer targets with a fixed seed, at most 10,000 executions and a 60-second budget each; uploads crash inputs on failure 15 min
fuzz-campaign schedule/workflow_dispatch only: ./gradlew fuzz --rerun-tasks --no-build-cache -Paxiom.fuzz.runs=200000 -Paxiom.fuzz.seconds=300 with the fixed seed; uploads corpus and crash inputs as fuzz-campaign-evidence (30 days); exploratory, not in check 60 min
native-io-uring ./gradlew :axiom-http:integrationTestIoUring -Daxiom.requireNativeTransport=true --rerun-tasks --no-build-cache: requires a real io_uring listener on Linux; asserts the selection testcase ran and the suite has no failures, errors or skips, then uploads its XML 20 min
quality downloads the jacoco-* artifacts, runs ./gradlew aggregateCoverage, uploads build/reports/jacoco/aggregateCoverage/ (XML and HTML) as coverage-report, then the hello smoke run ./gradlew :examples:hello:run --args="--smoke" 30 min
stress repeats :axiom-http:integrationTest three times with every CPU busy; diagnostic only, not needed by check 30 min
cross-os runs :axiom-http:integrationTest on macOS and Windows runners so the socket-buffer assumptions are exercised beyond Linux; diagnostic only 30 min
check needs build, matrix, unit, integration, fuzz, native-io-uring and quality and fails unless each succeeded (it runs even when one failed or was cancelled) 5 min
commits pull requests only: ./gradlew clean check on each commit (below) 90 min

Branch protection requires the status check named check; the aggregate job keeps that name, so the required check stays valid. commits and the diagnostic stress/cross-os jobs are not part of check, as before, and neither is the scheduled-only fuzz-campaign. fuzz is part of check but remains separate from the test matrix so its longer, bounded runs do not slow the fast unit jobs. native-io-uring is part of check: on Linux CI, io_uring must be usable and a real listener must have run, not skipped. The unit matrix is generated by the root unitTestMatrix task (modules whose test task is enabled and that have a test class not tagged integration), so a new module with tests is picked up automatically; integration likewise picks up every integrationTest task through the root aggregate. If the matrix job fails or prints nothing, unit does not run and check fails. The workflow graph is only verifiable on GitHub. The scheduled Compatibility workflow and the tag-triggered release workflow are separate.

Every commit builds

Rule: checksums go in the same commit as the dependency. A commit that adds or changes a dependency or plugin without the matching entries in gradle/verification-metadata.xml does not build, even if a later commit repairs it, and it breaks git bisect.

The commits job of the Build workflow (pull requests only, contents: read, no secrets) checks out the PR head with full history and runs ./gradlew clean check on each non-merge commit between the base and the head, oldest first, through .github/scripts/check-each-commit.sh. It builds every selected commit and reports all failures. Up to 20 commits are all built. A longer series is bounded (a full check per commit is minutes of runner time, and the job has a 90 minute limit): only commits that touch build files (*.gradle(.kts), gradle/, build-logic/, gradle.properties, the wrapper) are built, the newest 20 of them, and a warning annotation lists every commit that was not built. For pull requests whose head branch starts with dependabot/ only the tip commit is built, because the bot’s own commit changes versions without checksums and cannot build. The script’s selection logic was exercised locally against a scratch repository; the workflow itself only runs on GitHub.

Integration tests

Server, HTTP and test-client tests use small stand-in codecs, because those modules may not depend on axiom-json. The integration-tests module is where the real Jackson codec meets them: it runs one JSON contract (round trips, strictness failures, limits, 400/406/413/415 problem documents and their shape, charset handling) twice, through TestClient and over a live listener on a raw socket.

The module is deliberately listed in the boundary rules as test-only: it has no production sources, may declare only test-scope dependencies (axiom-test to compile against, axiom-http and axiom-json at test runtime, so tests see only Axiom’s API as an application would), and no other module may depend on it. Adding it therefore does not loosen any production rule: core, server and the test client still cannot depend on a codec or on Jackson. Its tests run in its integrationTest task (part of check) and finish in a few seconds; examples/rest-api remains a usage example with its own tests. The module is not published and the BOM does not constrain it.

Documentation site

The site (see the site guide) is generated from README.md and docs/*.md plus an aggregated Javadoc, and published to GitHub Pages by .github/workflows/docs.yml.

Generator choice. The site is built by Jekyll with the just-the-docs theme, which provides the navigation tree, search, colour schemes, callouts, code copy buttons and a mobile layout that a hand-written converter would have to reimplement. It replaced a small Kotlin Markdown converter, which is gone from build-logic. Jekyll runs outside Gradle, from Ruby gems pinned in site/Gemfile.lock with the SHA-256 of every gem file and installed frozen by ruby/setup-ruby; the site guide explains why this was chosen over actions/jekyll-build-pages with a remote theme (no unpinned or unverified fetch at build time, no CDN assets, the search index is built locally). Gradle prepares the Jekyll source (jekyllSource) so the Markdown stays the only copy, and builds the Javadoc, which is copied into the finished site. The supply-chain surface added is the lock file’s gems, reviewed as a diff when they change, and one more action pinned to a commit SHA.

Link checking. checkDocsLinks is part of check. It reads the Markdown and fails on a link to a missing page or file, a missing #anchor (GitHub’s heading ids), a site-absolute path, or a page without the front matter the menu needs, without needing Ruby. checkSiteLinks runs in CI on the built site and checks every page’s links and anchors, the theme assets and the links into api/. Links from documents to other repository files are rewritten to GitHub and must exist. External URLs are not fetched, so the build stays offline and deterministic.

Javadoc. aggregateJavadoc documents the main sources of every module that applies maven-publish (the same set checkPublicationCoverage uses), excluding internal packages. Its classpath is a root configuration with the published modules, resolved under the committed dependency verification metadata like every other configuration. Doclint is off for the aggregate because each module’s own javadoc task, part of the Build workflow, is the gate.

The Docs workflow is separate from the Build workflow and not part of its check job. Pull requests build and check the site and keep it as an artifact; only pushes to main deploy, from a job that alone holds pages: write and id-token: write.