{"record":{"id":"2e0c0e2e413880b4","repo":"quarkusio/quarkus","slug":"failed-to-determine-the-groupid-of-module","errorCode":null,"errorMessage":"Failed to determine the groupId of module ","messagePattern":"Failed to determine the groupId of module ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/WorkspaceModulePom.java","lineNumber":122,"sourceCode":"        }\n        final Model model = getModel();\n        if (model != null) {\n            String groupId = model.getGroupId();\n            if (groupId != null) {\n                return groupId;\n            }\n            Parent parent = model.getParent();\n            if (parent != null) {\n                groupId = parent.getGroupId();\n                if (groupId != null) {\n                    return groupId;\n                }\n            }\n        }\n        if (parent != null) {\n            return parent.getResolvedGroupId();\n        }\n        throw new RuntimeException(\"Failed to determine the groupId of module \" + pom);\n    }\n\n    /**\n     * Returns a resolved version value for this module, which may be inherited from a parent POM.\n     *\n     * @return resolved version value for this module\n     */\n    String getResolvedVersion() {\n        if (effectiveModel != null) {\n            return effectiveModel.getVersion();\n        }\n        final Model model = getModel();\n        if (model != null) {\n            String version = ModelUtils.getRawVersionOrNull(model);\n            if (version != null && ModelUtils.isUnresolvedVersion(version)) {\n                version = ModelUtils.resolveVersion(version, model);\n            }\n            if (version != null) {","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/WorkspaceModulePom.java#L104-L140","documentation":"WorkspaceModulePom.getResolvedGroupId resolves a module's groupId, which may be inherited from its parent POM. It walks up the parent chain and throws this RuntimeException when the chain is exhausted without any POM declaring a groupId. A Maven model is invalid without a resolvable groupId, so the workspace cannot key the module.","triggerScenarios":"A module pom.xml (and its entire parent chain) declares no <groupId> — typically a child POM that omits groupId but references a parent whose parent POM cannot be loaded/resolved, so the inherited groupId is unavailable.","commonSituations":"Child POM relying on a parent that is outside the workspace or fails to load; malformed <parent> block (wrong relativePath) so the parent resolves to a stub without groupId; hand-edited POMs stripped of groupId.","solutions":["Add an explicit <groupId> to the module's pom.xml project element","Verify the <parent> block: coordinates and <relativePath> so the parent POM actually loads and provides an inherited groupId","Run 'mvn help:effective-pom' to confirm the groupId resolves through inheritance","Ensure the parent POM is part of the workspace (listed in <modules>)"],"exampleFix":"<!-- before -->\n<project>\n  <artifactId>app</artifactId>\n  <version>1.0</version>\n</project>\n<!-- after -->\n<project>\n  <groupId>com.acme</groupId>\n  <artifactId>app</artifactId>\n  <version>1.0</version>\n</project>","handlingStrategy":"validation","validationCode":"Document pom = modelReader.read(pomFile.toFile(), null);\nboolean hasGroup = pom.getGroupId() != null\n    || (pom.getParent() != null && pom.getParent().getGroupId() != null);\nif (!hasGroup) throw new IllegalStateException(pomFile + \" has no resolvable groupId\");","typeGuard":null,"tryCatchPattern":"try {\n    String groupId = wsModulePom.getResolvedGroupId();\n} catch (RuntimeException e) {\n    log.error(\"Add explicit <groupId> or fix the <parent> block: \" + e.getMessage());\n}","preventionTips":["Always declare <groupId> explicitly in child POMs or ensure the parent chain is intact","Check <parent><relativePath> correctness after moving modules","Run mvn help:effective-pom to verify inheritance","Keep parent POMs inside the workspace"],"tags":["maven","pom","groupid"],"backgroundTag":"missing-maven-groupid","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"}