{"record":{"id":"8160f092a4adf462","repo":"quarkusio/quarkus","slug":"failed-to-read-p","errorCode":null,"errorMessage":"Failed to read ${p}","messagePattern":"Failed to read (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java","lineNumber":760,"sourceCode":"                    Path p = a.getFile().toPath();\n                    boolean isExtension = false;\n                    if (Files.isDirectory(p)) {\n                        isExtension = getExtensionDescriptorOrNull(p) != null;\n                    } else {\n                        // in some cases a local dependency might not producing the classes directory\n                        // but assembling the JAR directly using maven plugins\n                        if (!Files.exists(p)) {\n                            final Path workspaceJar = p.getParent().resolve(LocalWorkspace.getFileName(a));\n                            if (!Files.exists(workspaceJar)) {\n                                getLog().warn(\"Failed to resolve \" + a + \", \" + p + \" does not exist\");\n                                return true;\n                            }\n                            p = workspaceJar;\n                        }\n                        try (FileSystem fs = ZipUtils.newFileSystem(p)) {\n                            isExtension = getExtensionDescriptorOrNull(fs.getPath(\"\")) != null;\n                        } catch (IOException e) {\n                            throw new RuntimeException(\"Failed to read \" + p, e);\n                        }\n                    }\n                    if (isExtension) {\n                        ArrayNode deps = extensionDeps.get();\n                        if (deps == null) {\n                            deps = getMetadataNode(extObject).putArray(\"extension-dependencies\");\n                            extensionDeps.set(deps);\n                        }\n                        deps.add(ArtifactKey.of(a.getGroupId(), a.getArtifactId(), a.getClassifier(), a.getExtension())\n                                .toGacString());\n                    }\n                }\n                return true;\n            }\n\n            @Override\n            public boolean visitLeave(DependencyNode node) {\n                return true;","sourceCodeStart":742,"sourceCodeEnd":778,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java#L742-L778","documentation":"When scanning dependency jars to detect Quarkus extensions, the mojo opens each jar as a zip filesystem (ZipUtils.newFileSystem) and looks for the extension descriptor. An IOException while reading a jar is wrapped in RuntimeException('Failed to read <path>').","triggerScenarios":"A dependency jar in the runtime dependency list is corrupt, empty, truncated, or unreadable while the mojo iterates dependencies to find extension-dependencies.","commonSituations":"Interrupted downloads leaving partial jars in ~/.m2; jars with wrong zip structure; permission issues; non-jar files misdeclared as jar dependencies.","solutions":["Delete the corrupted jar from ~/.m2/repository and re-download (mvn -U)","Verify the jar opens: unzip -t <path-to-jar>","Check file permissions on the local repository","If a non-zip artifact is declared with jar type, correct the dependency type/classifier"],"exampleFix":"# before: corrupt jar\nunzip -t ~/.m2/repository/broken.jar  # fails\n# after\ndel ~/.m2/repository/broken/path\nmvn -U clean install","handlingStrategy":"validation","validationCode":"unzip -t path/to/dependency.jar","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use mvn -U to re-download partial downloads","Verify dependency types declared in pom","Check disk space during CI builds"],"tags":["maven","corrupt-jar","zip"],"backgroundTag":"corrupt-jar-file","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"}