Skip to content
Maven build cache

Reuse Maven outputs beyond a single runner.

Connect the Maven Build Cache Extension to shared storage. Let another compatible build reuse results while Maven keeps its own cache records and rules.

.boringcache.toml
workspace = "my-org/app"

[adapters.maven]
tag = "maven-cache"
command = ["./mvnw", "verify"]
boringcache maven
permissions:
  contents: read
  id-token: write

steps:
  - uses: boringcache/one@f0fb9b2d926a32b10c543e92093ba00c5a291b79 # v1.33.0
    with:
      mode: maven
      trust-policy: auto
  - run: ./mvnw verify
steps:
  - label: Build
    command: >
      boringcache ci run
      --oidc-provider buildkite
      -- boringcache maven
build:
  timeout: 1h
  id_tokens:
    BORINGCACHE_OIDC_TOKEN:
      aud: urn:boringcache:workload
  script:
    - boringcache ci run --oidc-provider gitlab -- boringcache maven

How BoringCache fits your build.

Build outputs

Use the Maven Build Cache Extension’s stored results.

Your project settings

Keep the configuration that defines reusable Maven work.

Shared visibility

Inspect reads, misses, and transfers in the workspace.

Keep Maven in charge of the build.

BoringCache provides the cache connection. Plugin parameters, line endings, and the build environment still determine whether stored results are compatible.

See how your Maven cache is used.

Track cache reads, writes, transfers, and stored data across your builds.

Explore the workspace →
Spring AI

Cache stored

BoringCache1.356 GiB
actions/cache4.574 GiB

70%

Less cache stored

Spring AI · compared with actions/cache

Keep shared-cache publication in trusted jobs.

Give consumers restore access and publishers a separate permission. Connect supported CI through OIDC or use scoped credentials.

Connect your CI →

Separate readers and publishers

  • Trusted builds Publish shared cache for the next build Read + publish
  • Pull requests Restore cache without replacing it Read only
  • Local development Use a scoped credential for the workspace Scoped access

Before you connect.

Does Maven cache always hit across local and CI?
No. Maven cache portability depends on line endings, plugin parameters, environment, and project configuration.
Does BoringCache require replacing Maven?
No. Maven still runs normally. BoringCache provides the shared cache endpoint and workspace controls.
Can Maven and Gradle use the same BoringCache workspace?
Yes. Each tool keeps its own protocol while sharing workspace access and reporting.
Read the Maven setup guide →

Start with your next Maven build.

Install the CLI. Run onboarding to connect your repository and configure your cache.

30 GB of cache free. No credit card required.

curl -sSL https://install.boringcache.com/install.sh | sh
boringcache onboard
boringcache maven