Java services are a large share of the code that product teams and services firms maintain, and they are not an easy fit for a coding agent on a laptop. A Maven or Gradle build downloads a lot on the first run, uses a lot of memory, and can take long enough that an agent waiting on it looks stuck. Give three agents the same laptop and the builds fight over memory.
This post is about setting up one agent's machine for a Java repository so the loop stays quick. Commands for the Sandscale CLI come from version 1.4.1. The Maven and Gradle options come from their own documentation. We do not show build output, because it depends on your project.
Why a machine per agent suits a JVM build
Three things make a Java build different from a typical script test run:
A cold start is expensive. The first build resolves and downloads dependencies, and later builds reuse a local cache ( ~/.m2/repository for Maven, ~/.gradle for Gradle).
The JVM wants memory.…