{"record":{"id":"9f9067998d53990f","repo":"quarkusio/quarkus","slug":"failed-to-read-ext-properties-path-from-artif","errorCode":null,"errorMessage":"Failed to read ${EXT_PROPERTIES_PATH} from ${artifactFile}","messagePattern":"Failed to read (.+?) from (.+?)","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"independent-projects/enforcer-rules/src/main/java/io/quarkus/enforcer/DeploymentDependencyRuleSupport.java","lineNumber":109,"sourceCode":"    }\n\n    private Optional<String> parseDeploymentGAV(Artifact artifact) {\n        File artifactFile = artifact.getFile();\n        if (artifactFile == null || !artifactFile.exists()) {\n            throw new IllegalStateException(\"Artifact file not found for \" + artifact);\n        }\n\n        Properties extProperties = new Properties();\n        if (artifactFile.isDirectory()) {\n            Path extPropertiesPath = artifactFile.toPath().resolve(EXT_PROPERTIES_PATH);\n            if (!Files.exists(extPropertiesPath)) {\n                return Optional.empty();\n            }\n            try (InputStreamReader isr = new InputStreamReader(Files.newInputStream(extPropertiesPath),\n                    StandardCharsets.UTF_8)) {\n                extProperties.load(isr);\n            } catch (IOException e) {\n                throw new UncheckedIOException(\"Failed to read \" + EXT_PROPERTIES_PATH + \" from \" + artifactFile, e);\n            }\n        } else {\n            try (ZipFile zipFile = new ZipFile(artifactFile)) {\n                ZipEntry entry = zipFile.getEntry(EXT_PROPERTIES_PATH);\n                if (entry == null) {\n                    return Optional.empty();\n                }\n                try (InputStreamReader isr = new InputStreamReader(zipFile.getInputStream(entry), StandardCharsets.UTF_8)) {\n                    extProperties.load(isr);\n                }\n            } catch (IOException e) {\n                throw new UncheckedIOException(\"Failed to read \" + EXT_PROPERTIES_PATH + \" from \" + artifactFile, e);\n            }\n        }\n\n        String deploymentGAV = extProperties.getProperty(\"deployment-artifact\");\n        if (deploymentGAV == null) {\n            throw new IllegalStateException(","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/enforcer-rules/src/main/java/io/quarkus/enforcer/DeploymentDependencyRuleSupport.java#L91-L127","documentation":"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>'.","triggerScenarios":"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.","commonSituations":"Two Maven builds running concurrently sharing one local repository; antivirus or sync tools (Dropbox) locking files; partially written target/ directory from a crashed build.","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"],"exampleFix":"// before: reading a half-written exploded jar\nProperties p = rule.parseDeploymentGAV(artifact); // UncheckedIOException\n// after: clean stale output, then rebuild\n// rm -rf ~/.m2/repository/io/quarkus/quarkus-<ext>/<version> && ./mvnw clean install","handlingStrategy":"try-catch","validationCode":"// Shell: pre-check readability of exploded extension metadata\n test -r \"$APP_DIR/quarkus-extension.properties\" && echo ok || echo \"unreadable/missing\"","typeGuard":null,"tryCatchPattern":"try {\n    support.getDeploymentGAV(artifact);\n} catch (UncheckedIOException e) {\n    getLog().warn(\"I/O failure reading quarkus-extension.properties: \" + e.getMessage());\n    // clean rebuild / retry resolution\n}","preventionTips":["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"],"tags":["maven","io","filesystem","quarkus-build"],"backgroundTag":"artifact-file-read-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}