{"record":{"id":"f8eb1052cdbbd9a4","repo":"quarkusio/quarkus","slug":"failed-to-collect-runtime-dependencies-of-projec","errorCode":null,"errorMessage":"Failed to collect runtime dependencies of ${project.getArtifact()}","messagePattern":"Failed to collect runtime dependencies of (.+?)","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java","lineNumber":729,"sourceCode":"\n    private void setBuiltWithQuarkusCoreVersion(String coreVersion, ObjectNode extObject) throws MojoExecutionException {\n        if (coreVersion != null) {\n            ObjectNode metadata = getMetadataNode(extObject);\n            metadata.put(\"built-with-quarkus-core\", coreVersion);\n        } else if (!ignoreNotDetectedQuarkusCoreVersion) {\n            throw new MojoExecutionException(\"Failed to determine the Quarkus core version used to build the extension\");\n        }\n    }\n\n    private String findQuarkusCoreVersion() throws MojoExecutionException {\n        final QuarkusCoreDeploymentVersionLocator coreVersionLocator = new QuarkusCoreDeploymentVersionLocator();\n        final DependencyNode root;\n        try {\n            root = repoSystem.collectDependencies(repoSession, newCollectRuntimeDepsRequest()).getRoot();\n        } catch (MojoExecutionException e) {\n            throw e;\n        } catch (Exception e) {\n            throw new MojoExecutionException(\"Failed to collect runtime dependencies of \" + project.getArtifact(), e);\n        }\n        root.accept(coreVersionLocator);\n        return coreVersionLocator.coreVersion;\n    }\n\n    private void addExtensionDependencies(ObjectNode extObject) throws MojoExecutionException {\n        final AtomicReference<ArrayNode> extensionDeps = new AtomicReference<>();\n        final DependencyVisitor capabilityCollector = new DependencyVisitor() {\n            @Override\n            public boolean visitEnter(DependencyNode node) {\n                final org.eclipse.aether.artifact.Artifact a = node.getArtifact();\n                if (a != null && a.getFile() != null && a.getExtension().equals(\"jar\")) {\n                    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","sourceCodeStart":711,"sourceCodeEnd":747,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java#L711-L747","documentation":"While finding the Quarkus core version, the mojo collects the runtime dependency graph via Maven Resolver (repoSystem.collectDependencies). Any exception other than MojoExecutionException during collection is wrapped as 'Failed to collect runtime dependencies of <artifact>'.","triggerScenarios":"repoSystem.collectDependencies throws (corrupt local repo, unreachable remote, invalid pom of a dependency) when executed for this project's runtime artifact.","commonSituations":"Corrupted ~/.m2 repository entries; dependency POMs invalid; network failure reaching remote repositories; snapshot resolution issues.","solutions":["Run mvn -U to force update snapshots and refresh metadata","Delete the offending artifact directory from ~/.m2/repository and rebuild","Check network/proxy settings and repository availability in settings.xml","Inspect the cause in the stack trace for the specific unresolvable artifact"],"exampleFix":"// not code-fixable; typically environment\n// before: broken ~/.m2 entry\nrm -rf ~/.m2/repository/<offending/group/artifact>\nmvn clean install","handlingStrategy":"retry","validationCode":"mvn -U dependency:resolve","typeGuard":null,"tryCatchPattern":"try {\n  mojo.execute();\n} catch (MojoExecutionException e) {\n  if (e.getMessage().contains(\"Failed to collect runtime dependencies\")) {\n    // clean local repo entry and retry\n  }\n}","preventionTips":["Run mvn -U on snapshot-heavy builds","Monitor ~/.m2 for corruption","Ensure network/proxy config in settings.xml"],"tags":["maven","dependency-collection","resolver"],"backgroundTag":"dependency-resolution-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}