{"record":{"id":"8f3ed52d982c0f00","repo":"quarkusio/quarkus","slug":"failed-to-collect-extension-information-for-arti","errorCode":null,"errorMessage":"Failed to collect extension information for ${artifact}","messagePattern":"Failed to collect extension information for (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java","lineNumber":883,"sourceCode":"    private ExtensionInfo getExtensionInfoOrNull(Artifact artifact, List<RemoteRepository> repos) {\n        if (!artifact.getExtension().equals(ArtifactCoords.TYPE_JAR)) {\n            return null;\n        }\n        ExtensionInfo ext = allExtensions.computeIfAbsent(getKey(artifact), k -> resolveExtensionInfo(artifact, repos));\n        return ext == EXT_INFO_NONE ? null : ext;\n    }\n\n    private ExtensionInfo resolveExtensionInfo(Artifact artifact, List<RemoteRepository> repos) {\n        artifact = resolve(artifact, repos);\n        final Properties descriptor = PathTree.ofDirectoryOrArchive(artifact.getFile().toPath())\n                .apply(BootstrapConstants.DESCRIPTOR_PATH, ApplicationDependencyResolver::readExtensionProperties);\n        if (descriptor == null) {\n            return EXT_INFO_NONE;\n        }\n        try {\n            return new ExtensionInfo(artifact, descriptor, devMode);\n        } catch (BootstrapDependencyProcessingException e) {\n            throw new RuntimeException(\"Failed to collect extension information for \" + artifact, e);\n        }\n    }\n\n    private static Properties readExtensionProperties(PathVisit visit) {\n        if (visit == null) {\n            return null;\n        }\n        try {\n            final Properties rtProps = new Properties();\n            try (BufferedReader reader = Files.newBufferedReader(visit.getPath())) {\n                rtProps.load(reader);\n            }\n            return rtProps;\n        } catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n    }\n","sourceCodeStart":865,"sourceCodeEnd":901,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java#L865-L901","documentation":"The ApplicationDependencyResolver constructor builds an ExtensionInfo for each extension artifact from its resolved descriptor. If ExtensionInfo's constructor throws BootstrapDependencyProcessingException (e.g. malformed or missing quarkus-extension.properties / descriptor data), it is wrapped in a RuntimeException \"Failed to collect extension information for <artifact>\".","triggerScenarios":"getExtensionInfo in the ApplicationDependencyResolver constructor receives a non-null descriptor but new ExtensionInfo(artifact, descriptor, devMode) fails with BootstrapDependencyProcessingException — e.g. invalid extension descriptor contents or unreadable extension metadata.","commonSituations":"A jar mislabeled/published as a Quarkus extension without proper quarkus-extension.properties; a hand-built extension with a malformed deployment descriptor; corrupted cached extension artifact in ~/.m2/repository.","solutions":["Identify the artifact from the message and inspect its quarkus-extension.properties / deployment descriptor.","Rebuild the extension (mvn install) if it is locally developed, ensuring the quarkus-extension packaging/processor is correct.","Delete the artifact from ~/.m2/repository and re-download to rule out cache corruption.","If the artifact is not really a Quarkus extension, remove or correct the dependency."],"exampleFix":"// before\n// extension jar built without the quarkus-extension packaging\n<packaging>jar</packaging>\n// after\n// in the extension's deployment/runtime module\n<packaging>jar</packaging>\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-extension-maven-plugin</artifactId>\n</dependency>\n<!-- and configure quarkus-extension:extension-descriptor to emit quarkus-extension.properties -->","handlingStrategy":"validation","validationCode":"// Check extension metadata exists before resolution:\ntry (var zip = new java.util.zip.ZipFile(extArtifact.getFile())) {\n    if (zip.getEntry(\"META-INF/quarkus-extension.properties\") == null\n        && zip.getEntry(\"META-INF/quarkus-extension.yaml\") == null) {\n        throw new IllegalStateException(extArtifact + \" is not a valid Quarkus extension\");\n    }\n}","typeGuard":"static boolean hasExtensionMetadata(java.nio.file.Path extensionJar) throws java.io.IOException {\n    try (var zip = new java.util.zip.ZipFile(extensionJar.toFile())) {\n        return zip.getEntry(\"META-INF/quarkus-extension.properties\") != null\n            || zip.getEntry(\"META-INF/quarkus-extension.yaml\") != null;\n    }\n}","tryCatchPattern":"try {\n    resolver.resolve(...);\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"Failed to collect extension information for\")) {\n        log.error(\"Bad extension descriptor for \" + e.getMessage().replace(\"Failed to collect extension information for \", \"\"), e);\n    }\n    throw e;\n}","preventionTips":["Only depend on extensions built with the quarkus-extension-maven-plugin extension-descriptor goal.","Rebuild locally developed extensions after changing their descriptor configuration.","Delete and re-download extension artifacts if their cached copy looks corrupted."],"tags":["maven","extension","descriptor","bootstrap"],"backgroundTag":"extension-descriptor-invalid","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"}