{"record":{"id":"78d165553ccdf425","repo":"quarkusio/quarkus","slug":"failed-to-collect-dependencies-of","errorCode":null,"errorMessage":"Failed to collect dependencies of ","messagePattern":"Failed to collect dependencies of ","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":998,"sourceCode":"                node.setData(QUARKUS_EXTENSION_DEPENDENCY, this);\n            } else if (data.put(QUARKUS_EXTENSION_DEPENDENCY, this) != null) {\n                throw new IllegalStateException(\n                        \"Dependency node \" + node + \" has already been associated with an extension dependency\");\n            }\n        }\n\n        void addExtensionDependency(ExtensionDependency dep) {\n            if (extDeps == null) {\n                extDeps = new ArrayList<>();\n            }\n            extDeps.add(dep);\n        }\n\n        private void collectDeploymentDeps() {\n            log.debugf(\"Collecting dependencies of %s\", info.deploymentArtifact);\n            deploymentNode = collectDependencies(info.deploymentArtifact, exclusions, runtimeNode.getRepositories());\n            if (deploymentNode.getChildren().isEmpty()) {\n                throw new RuntimeException(\n                        \"Failed to collect dependencies of \" + deploymentNode.getArtifact()\n                                + \": either its POM could not be resolved from the available Maven repositories \"\n                                + \"or the artifact does not have any dependencies while at least a dependency on the runtime artifact \"\n                                + info.runtimeArtifact + \" is expected\");\n            }\n            ensureScopeAndOptionality(deploymentNode, runtimeNode.getDependency().getScope(),\n                    runtimeNode.getDependency().isOptional());\n\n            replaceRuntimeExtensionNodes(deploymentNode);\n            if (!presentInTargetGraph) {\n                throw new RuntimeException(\n                        \"Quarkus extension deployment artifact \" + deploymentNode.getArtifact()\n                                + \" does not appear to depend on the corresponding runtime artifact \"\n                                + info.runtimeArtifact);\n            }\n        }\n\n        private void injectDeploymentDependency(AppDep parent) {","sourceCodeStart":980,"sourceCodeEnd":1016,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java#L980-L1016","documentation":"After collecting the dependency graph of a deployment artifact, Quarkus expects it to have at least one child — at minimum the dependency on the corresponding runtime artifact. If the collected graph has no children, this RuntimeException explains either the deployment POM could not be resolved from available repositories, or the deployment artifact declares no dependencies at all (violating the requirement that a deployment module depends on its runtime module).","triggerScenarios":"ExtensionDependency.collectDeploymentDeps() calls collectDependencies(info.deploymentArtifact, ...) and the resulting deploymentNode has zero children — deployment POM unresolvable (silently yielding an empty graph) or a hand-written deployment POM with no <dependencies> entry on the runtime artifact.","commonSituations":"Custom/in-house Quarkus extension where the -deployment POM forgot the dependency on the runtime artifact; a deployment POM published to a repo where its transitive POMs 404; incorrectly generated extension skeleton missing the runtime dependency.","solutions":["Open the deployment artifact's POM and ensure it declares a dependency on the corresponding runtime artifact (io.quarkus:quarkus-<ext> or your custom equivalent).","Verify the deployment POM and all its parent/transitive POMs are downloadable from the configured repositories (mvn dependency:tree on the deployment artifact).","Delete the cached deployment artifact in ~/.m2/repository and re-resolve with -U in case of corruption.","Re-generate the extension with the Quarkus extension-maven-plugin so the runtime/deployment module structure is correct."],"exampleFix":"<!-- before: deployment POM with no dependencies -->\n<artifactId>myext-deployment</artifactId>\n<!-- after: deployment POM depends on runtime module -->\n<artifactId>myext-deployment</artifactId>\n<dependencies>\n  <dependency>\n    <groupId>com.acme</groupId>\n    <artifactId>myext</artifactId>\n    <version>${project.version}</version>\n  </dependency>\n</dependencies>","handlingStrategy":"validation","validationCode":"// for custom extensions, assert the deployment POM lists the runtime artifact\nDocument pom = loadPom(\"myext-deployment/pom.xml\");\nNodeList deps = (NodeList) xpath.evaluate(\n    \"/project/dependencies/dependency[artifactId='myext']\", pom, XPathConstants.NODESET);\nif (deps.getLength() == 0)\n    throw new IllegalStateException(\"deployment POM must depend on runtime artifact 'myext'\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always generate extensions with quarkus-maven-plugin's extension goal so runtime/deployment wiring is correct.","Never hand-strip dependencies from a -deployment POM.","Run 'mvn dependency:tree' on the deployment module before publishing it.","Enforce in CI that every *-deployment artifact depends on its sibling runtime artifact."],"tags":["quarkus-extension","maven","deployment-artifact"],"backgroundTag":"extension-deployment-pom-misconfigured","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"}