quarkusio/quarkus · error · GradleException
Failed to write Quarkus build configuration settings
Error message
Failed to write Quarkus build configuration settings
What it means
QuarkusGradle's dumpEffectiveConfiguration (QuarkusShowEffectiveConfig task) collects the effective Quarkus build config and stores it as a Java properties file named <finalName>.quarkus-build.properties in buildDir. This GradleException wraps any IOException thrown by the properties store/write operation, meaning the file could not be created or written to disk.
Source
Thrown at devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusShowEffectiveConfig.java:98
Runner jar (if built): {}
Native runner (if built): {}
application.(properties|yaml|yml) sources: {}""",
jarType,
finalName,
outputDirectory(),
fastJar,
runnerJar(),
nativeRunner(),
sourceNames.stream().collect(Collectors.joining("\n ", "\n ", "\n")));
if (getSaveConfigProperties().get()) {
Properties props = new Properties();
props.putAll(effectiveConfig.getValues());
Path file = buildDir.toPath().resolve(finalName + ".quarkus-build.properties");
try (BufferedWriter writer = newBufferedWriter(file)) {
props.store(writer, format("Quarkus build properties with JAR type %s", jarType));
} catch (IOException e) {
throw new GradleException("Failed to write Quarkus build configuration settings", e);
}
getLogger().lifecycle("\nWrote configuration settings to {}", file);
}
} catch (Exception e) {
e.printStackTrace();
throw new GradleException("WTF", e);
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Check that the build directory exists and is writable (ls -ld build; touch build/.probe).
- Free disk space or fix filesystem permissions on the project directory.
- Close programs locking the file (IDE, antivirus, previous Gradle daemon) or stop daemons with ./gradlew --stop and retry.
- Recreate the build directory: rm -rf build && ./gradlew quarkusShowEffectiveConfig.
Defensive patterns
Strategy: try-catch
Validate before calling
Path file = Paths.get(project.getBuildDir().getAbsolutePath(), finalName + ".quarkus-build.properties");
File dir = file.getParent().toFile();
if (!dir.canWrite()) throw new IllegalStateException("build dir not writable: " + dir);
if (file.toFile().isDirectory()) throw new IllegalStateException("target path is a directory: " + file); Try / catch
try {
./gradlew quarkusShowEffectiveConfig
} catch (GradleException e) {
if (e.getMessage().contains("Failed to write Quarkus build configuration settings")) {
// check disk space and build/ permissions, stop Gradle daemon, retry
}
} Prevention
- Verify build/ directory is writable before running config-dump tasks in CI
- Exclude the build directory from antivirus/IDE file watchers
- Monitor disk space on CI runners
- Avoid running clean concurrently with config-dump tasks
When it happens
Trigger: Running ./gradlew quarkusShowEffectiveConfig when buildDir is not writable, the build directory was deleted mid-build, disk is full, the target path is a directory instead of a file, or file permission denies (read-only checkout, CI sandbox, Windows file lock held by another process).
Common situations: CI runners with read-only workspaces or full disks; the build/ directory being watched/locked by an IDE or antivirus; a user deleted build/ while the task ran; permissions changed by Docker volume mounts.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- Failed to collect project's classes in a temporary dir
- Failed to get source file mtime for
- Failed to delete file:
- Failed to create output directory for generated sources: %s
- IOException (wrapped)
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/c40462e9777f3a45.
Report an issue: GitHub.