---
title: "Get the build cache performance of a Maven build."
method: GET
path: "/api/builds/{id}/maven-build-cache-performance"
tags: ["Builds", "GradleEnterprise", "Develocity"]
---

# Get the build cache performance of a Maven build.

`GET /api/builds/{id}/maven-build-cache-performance`

## Request

- Base URL: `https://develocity.example.com`
- URL: `https://develocity.example.com/api/builds/{id}/maven-build-cache-performance`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/develocity/apis/develocity-api/docs/api/builds/:id/maven-build-cache-performance/get.ts> (a function with typed inputs; its response is checked against the schema)

This model is Maven specific and cannot be requested for another build tool.

## Response `200`

The build cache performance of a Maven build.

- MavenBuildCachePerformance: The build cache performance of a Maven build.
  - `id` string, required: The Build Scan ID.
  - `buildTime` integer, required: Wall clock duration of the build in milliseconds.
  - `effectiveProjectExecutionTime` integer, required: Wall clock time spent executing projects in milliseconds. It is the time spent between the start of the first project execution and the end of the last project execution, removing any interval where no project is being executed.
  - `serialProjectExecutionTime` integer, required: Wall clock time of all project executions in milliseconds. It is the sum of all individual project durations.
  - `serializationFactor` number, double, required: The ratio of `serialProjectExecutionTime` over the `effectiveProjectExecutionTime`. Quantifies the effect of project parallelization. A value equal to `1` means that no parallelization occurs. A value greater than `1` means that projects are executed faster due to parallelization.
  - `goalExecution` MavenBuildCachePerformanceGoalExecutionEntry[], required: A list of executed goals with performance related information.
    - `goalName` string, required: The goal name.
    - `mojoType` string, required: The fully qualified class name of the Mojo that provides the implementation of this goal.
    - `goalExecutionId` string, required: The goal execution ID.
    - `goalProjectName` string, required: The goal project name.
    - `avoidanceOutcome` 'avoided_from_local_cache' | 'avoided_from_remote_cache' | 'executed_cacheable' | 'executed_not_cacheable' | 'executed_unknown_cacheability' | 'skipped', required: The avoidance outcome of this task with respect to performance: * `avoided_from_local_cache` - Goal whose execution is avoided due to reusing a local build cache entry * `avoided_from_remote_cache` - Goal whose execution is avoided due to reusing a remote build cache entry * `executed_cacheable` - Goal which is executed but is cacheable * `executed_not_cacheable` - Goal which is executed but is not cacheable * `executed_unknown_cacheability` - Goal which is executed and whose cacheability cannot be determined * `skipped` - Skipped goal
    - `duration` integer, required: The goal duration in milliseconds.
    - `fingerprintingDuration` integer, nullable: The goal fingerprinting duration in milliseconds. This duration is part of the complete task execution duration. `null` if the goal is not fingerprinted.
    - `avoidanceSavings` integer, nullable: The goal avoidance savings in milliseconds, which can be negative. Negative values indicate that it takes more time to reuse outputs than it did to create them originally. `null` if the information is not available.
    - `nonCacheabilityCategory` 'build_cache_disabled_by_user' | 'goal_execution_marked_non_cacheable' | 'goal_not_supported' | 'no_gradle_enterprise_server_configured' | 'no_develocity_server_configured' | 'non_clean_build' | 'not_entitled' | 'offline_build' | 'unknown' | 'unknown_entitlements', nullable: The category of the non-cacheability reason: * `build_cache_disabled_by_user` - The build cache is disabled by the user * `goal_execution_marked_non_cacheable` - The goal execution is marked as non-cacheable * `goal_not_supported` - The goal does not support build caching * `no_gradle_enterprise_server_configured` - No Develocity server is configured **Deprecated, use `no_develocity_server_configured` instead** * `no_develocity_server_configured` - No Develocity server is configured * `non_clean_build` - The `clean` lifecycle is not executed * `not_entitled` - The Develocity license entitlements does not allow Maven build caching * `offline_build` - The build is run in offline mode * `unknown` - Reason for disabled caching is not known * `unknown_entitlements` - The Develocity license entitlements cannot be checked `null` when the goal execution is cacheable or if the information is not available.
    - `nonCacheabilityReason` string, nullable: The human-readable reason for a non-cacheable goal execution. `null` when the goal execution is cacheable or if the information is not available.
    - `cacheArtifactSize` integer, nullable: The number of bytes of the produced or consumed cache artifact. For a goal execution where the outputs are successfully stored to a local or remote cache, this is the size of the stored cache artifact. For a goal execution where the outputs are successfully loaded from a local or remote cache, this is the size of the loaded cache artifact. `null` if the goal execution is not cacheable, or if the attempt to store or load the artifact from cache does not succeed.
    - `cacheArtifactRejectedReason` 'artifact_size_too_large', nullable: The reason why the cache artifact has been rejected: * `artifact_size_too_large` - The size of the artifact is larger than the remote build cache can accept. `null` if the goal is not cacheable, or if the attempt to store the artifact does not succeed.
    - `cacheKey` string, nullable: Build cache key. `null` if no build cache key was computed (e.g. when fingerprinting failed).
    - `hasFailed` boolean, required: True when the goal failed, false otherwise.
  - `goalFingerprintingSummary` MavenBuildCachePerformanceGoalFingerprintingSummary, required: A summary of goal fingerprinting. Fingerprinted goals are part of the `goalExecution.avoidedGoals` or `goalExecution.executedGoals` buckets.
    - `count` integer, required: Count of fingerprinted goals.
    - `serialDuration` integer, required: Sum of all fingerprinting times of fingerprinted goals in milliseconds.
  - `avoidanceSavingsSummary` MavenBuildCachePerformanceAvoidanceSavingsSummary, required: A breakdown of avoidance savings.
    - `total` integer, required: The estimated reduction in serial execution time of the goals due to their outputs being reused in milliseconds.
    - `ratio` number, double, required: The ratio of the total avoidance savings against the potential serial execution time (which is the actual serial execution time plus the total avoidance savings). Quantifies the effect of avoidance savings in this build. The bigger the ratio is, the more time is saved when running the build.
    - `localBuildCache` integer, required: The estimated reduction in serial execution time of the goals due to their outputs being reused from the local build cache in milliseconds.
    - `remoteBuildCache` integer, required: The estimated reduction in serial execution time of the goals due to their outputs being reused from the remote build cache in milliseconds.
  - `buildCaches` MavenBuildCachePerformanceBuildCaches, nullable: Information about the local and remote build caches used in the build, if it is configured in the build. `null` if the build cache configuration cannot be captured (e.g. very early build failure).
    - `local` MavenBuildCachePerformanceBuildCacheLocalInfo, nullable: Information about the local build cache used in the build, if it is configured in the build. `null` if the local build cache is not configured.
      - `isEnabled` boolean, required: Indicates whether the local build cache is enabled.
      - `isPushEnabled` boolean, nullable: Indicates whether pushing to the local build cache is enabled. `null` if the local build cache is disabled.
      - `isDisabledDueToError` boolean: Indicates whether the local cache is disabled due to an error occurring in loading or storing local build cache entries. `null` if the local build cache is disabled.
      - `directory` string, nullable: Location of the local build cache. Can be relative or absolute depending on its value. `null` if the local build cache is disabled.
    - `remote` MavenBuildCachePerformanceBuildCacheRemoteInfo, nullable: Information about the remote build cache used in the build, if it is configured in the build. `null` if the remote build cache is not configured.
      - `isEnabled` boolean, required: Indicates whether the remote build cache is enabled.
      - `isPushEnabled` boolean, nullable: Indicates whether pushing to the remote build cache is enabled. `null` if the remote build cache is disabled.
      - `isDisabledDueToError` boolean: Indicates whether the remote build cache is disabled during the build due to an error occurring in loading or storing remote build cache entries. `null` if the remote build cache is disabled.
      - `url` string, nullable: URL of the remote build cache. `null` if the remote build cache is disabled.
    - `overhead` MavenBuildCachePerformanceBuildCacheOverhead, required: Information about the build cache overhead in this build.
      - `uploading` integer, required: Overhead of upload operations in milliseconds.
      - `downloading` integer, required: Overhead of download operations in milliseconds.
      - `packing` integer, required: Overhead of pack operations in milliseconds.
      - `unpacking` integer, required: Overhead of unpack operations in milliseconds.

## Other responses

- `400`: The request cannot be fulfilled due to a problem.
- `404`: The referenced resource either does not exist or the permissions to know about it are missing.
- `500`: The server encountered an unexpected error.
- `503`: The server is not ready to handle the request.

---

[API](https://skmtc.dev/develocity/apis/develocity-api.md) - [All operations](https://skmtc.dev/develocity/apis/develocity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/develocity/apis/develocity-api/revisions/b49835fbf065?raw)
