quarkusio/quarkus · error · UncheckedIOException
Failed to read ${EXT_PROPERTIES_PATH} from ${artifactFile}
Error message
Failed to read ${EXT_PROPERTIES_PATH} from ${artifactFile} What it means
When a Quarkus runtime artifact is a directory (exploded build output), parseDeploymentGAV reads quarkus-extension.properties with Files.newInputStream and Properties.load. An IOException while reading — permission issues, file deleted mid-read, I/O error — is wrapped in UncheckedIOException 'Failed to read <path> from <artifactFile>'.
Source
Thrown at independent-projects/enforcer-rules/src/main/java/io/quarkus/enforcer/DeploymentDependencyRuleSupport.java:109
}
private Optional<String> parseDeploymentGAV(Artifact artifact) {
File artifactFile = artifact.getFile();
if (artifactFile == null || !artifactFile.exists()) {
throw new IllegalStateException("Artifact file not found for " + artifact);
}
Properties extProperties = new Properties();
if (artifactFile.isDirectory()) {
Path extPropertiesPath = artifactFile.toPath().resolve(EXT_PROPERTIES_PATH);
if (!Files.exists(extPropertiesPath)) {
return Optional.empty();
}
try (InputStreamReader isr = new InputStreamReader(Files.newInputStream(extPropertiesPath),
StandardCharsets.UTF_8)) {
extProperties.load(isr);
} catch (IOException e) {
throw new UncheckedIOException("Failed to read " + EXT_PROPERTIES_PATH + " from " + artifactFile, e);
}
} else {
try (ZipFile zipFile = new ZipFile(artifactFile)) {
ZipEntry entry = zipFile.getEntry(EXT_PROPERTIES_PATH);
if (entry == null) {
return Optional.empty();
}
try (InputStreamReader isr = new InputStreamReader(zipFile.getInputStream(entry), StandardCharsets.UTF_8)) {
extProperties.load(isr);
}
} catch (IOException e) {
throw new UncheckedIOException("Failed to read " + EXT_PROPERTIES_PATH + " from " + artifactFile, e);
}
}
String deploymentGAV = extProperties.getProperty("deployment-artifact");
if (deploymentGAV == null) {
throw new IllegalStateException(View on GitHub (pinned to e1c734241f)
Solutions
- Stop concurrent builds/processes sharing the same local repository and clean the affected artifact directory, then rebuild
- Fix file permissions on the exploded artifact directory
- Delete the corrupted/partial artifact from ~/.m2 (or target/) and let Maven re-resolve it
- Retry the build; if it persists, check disk health and filesystem errors
Example fix
// before: reading a half-written exploded jar Properties p = rule.parseDeploymentGAV(artifact); // UncheckedIOException // after: clean stale output, then rebuild // rm -rf ~/.m2/repository/io/quarkus/quarkus-<ext>/<version> && ./mvnw clean install
Defensive patterns
Strategy: try-catch
Validate before calling
// Shell: pre-check readability of exploded extension metadata test -r "$APP_DIR/quarkus-extension.properties" && echo ok || echo "unreadable/missing"
Try / catch
try {
support.getDeploymentGAV(artifact);
} catch (UncheckedIOException e) {
getLog().warn("I/O failure reading quarkus-extension.properties: " + e.getMessage());
// clean rebuild / retry resolution
} Prevention
- Avoid two builds sharing one local repository concurrently
- Exclude repository/build directories from antivirus and file-sync tools
- Clean-rebuild after any crashed build to remove partially written output
- Ensure adequate disk space
When it happens
Trigger: parseDeploymentGAV on a directory-type artifact where EXT_PROPERTIES_PATH exists but cannot be read: unreadable file permissions, truncated file, concurrent build deleting it, or disk I/O failure.
Common situations: Two Maven builds running concurrently sharing one local repository; antivirus or sync tools (Dropbox) locking files; partially written target/ directory from a crashed build.
Related errors
- Unable to create directory: ${directory}
- Unable to collect the target directories
- Could not create directory ${outputDirectory}
- Could not create directory ${outputDirectory}
- Failed to create <classesDir>
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/9f9067998d53990f.
Report an issue: GitHub.