Skip to content
Latchkey
Java & JVM

Maven, Gradle, and JVM failures in CI - resolved.

Resolve Java build failures: Maven and Gradle dependency errors, JVM heap exhaustion, daemon problems, toolchain mismatches, and test failures. Clear fixes for CI pipelines.

Maven

Dependency resolution, plugins, and repositories.

"NoSuchMethodError" (AssertJ/Mockito)Fix java.lang.NoSuchMethodError in AssertJ or Mockito tests in CI - a transitive dependency pins an older "must declare at least one ArgumentsSource"Fix JUnit 5 "Configuration error: ... must declare at least one ArgumentsSource" / "junit-jupiter-params not JUnit 5 tests not running (engine missing)Fix JUnit 5 tests being skipped in CI - Surefire/Gradle needs the JUnit Platform plus jupiter-engine, and "Could not find SNAPSHOT artifact"Fix Maven "Could not find artifact ...:SNAPSHOT in snapshots" in CI - a SNAPSHOT dependency was never "Could not transfer artifact ... 401/403"Fix Maven "Could not transfer artifact ... authentication failed ... "error: release version 17 not supported"Fix Maven "error: release version 17 not supported" in CI - the maven.compiler.release is newer than the JDK "Failed to execute goal spring-boot:repackage"Fix Maven "Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:repackage" in CI - "invalid target release"Fix Maven "Fatal error compiling: invalid target release: 21" in CI - the JDK running Maven is older than the "mvn: command not found"Fix "mvn: command not found" / "mvn: not found" in CI - Maven is not installed on the runner or not on PATH. "PKIX path building failed"Fix Maven "PKIX path building failed: unable to find valid certification path" in CI - the JDK truststore "Dependency convergence error"Fix Maven Enforcer "Failed while enforcing releasability ... Dependency convergence error" in CI - the same "required a bean that could not be found"Fix Spring "Parameter N of constructor in X required a bean of type Y that could not be found" in CI - a "@MockBean leaks between tests"Fix Spring Boot "@MockBean stubs leak between tests" in CI - stale stubbing or recorded interactions carry "Could not connect to Ryuk"Fix Testcontainers "Could not start container" / "Timed out waiting for container ...

Gradle

Daemon, cache, and build script errors.

":compileJava" - "cannot find symbol"Fix Gradle ":compileJava FAILED" with "error: cannot find symbol" in CI - a missing dependency on the compile "Build cache is disabled"Fix Gradle "Build cache is disabled" in CI - the cache flag is off, so every task re-runs from scratch and "N problems were found storing the configuration cache"Fix Gradle "Configuration cache problems found" / "invocation of Task.project at execution time is "Could not get unknown property"Fix Gradle "Could not get unknown property 'x' for <object>" in CI - a referenced project/ext/version-catalog "Could not resolve ... kotlin-stdlib"Fix "Could not resolve org.jetbrains.kotlin:kotlin-stdlib:<version>" in CI - Gradle cannot find or agree on "Could not resolve"Fix Gradle "Could not resolve <dependency>" / "Could not find" in CI - wrong coordinates, a missing "Could not PUT ... 401 Unauthorized"Fix Gradle maven-publish "Could not PUT ... received status code 401 from server: Unauthorized" in CI - "Using insecure protocols ... is unsupported"Fix Gradle 7+ "Using insecure protocols with repositories, without explicit opt-in, is unsupported" in CI - "does not \"opens\" ... to unnamed module" (test)Fix Gradle test failures on JDK 17+ with "InaccessibleObjectException: module java.base does not \"opens\" "cannot find symbol" (Lombok)Fix javac "cannot find symbol: method getX()" with Lombok in CI - annotation processing is off or Lombok is "No implementation was created for Mapper"Fix MapStruct "No implementation was created for ...Mapper due to having a problem in the erroneous element"

JVM memory & runtime

Heap, metaspace, and OutOfMemoryError.

Toolchain & versions

JDK selection and bytecode mismatches.

Explore other topics