{"record":{"id":"b43ceb6276b72b42","repo":"quarkusio/quarkus","slug":"failed-to-determine-the-version-of-module","errorCode":null,"errorMessage":"Failed to determine the version of module ","messagePattern":"Failed to determine the version 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":147,"sourceCode":"     */\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) {\n                return version;\n            }\n        }\n        if (parent != null) {\n            return parent.getResolvedVersion();\n        }\n        throw new RuntimeException(\"Failed to determine the version of module \" + pom);\n    }\n\n    /**\n     * Allows scheduling module loading after this module has been loaded.\n     *\n     * @param module module to load once this module has been loaded\n     */\n    void thenLoad(WorkspaceModulePom module) {\n        thenLoad.add(module);\n    }\n\n    /**\n     * Modules that should be loaded after this module.\n     *\n     * @return modules that should be loaded after this module\n     */\n    Deque<WorkspaceModulePom> getThenLoad() {\n        return thenLoad;","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/WorkspaceModulePom.java#L129-L165","documentation":"WorkspaceModulePom.getResolvedVersion resolves a module's version, which may be inherited from its parent POM. It walks the parent chain and throws this RuntimeException when no POM in the chain declares a version. A Maven model is invalid without a resolvable version, so the module cannot be identified in the workspace.","triggerScenarios":"A module pom.xml (and its whole parent chain) declares no <version> — typically a child omitting <version> while its <parent> cannot be resolved (wrong coordinates/relativePath) or the parent itself has no version.","commonSituations":"Child POMs depending on parent inheritance but the parent POM is missing from the workspace; CI-style version placeholders (${revision}) unset; hand-edited POMs with the version removed.","solutions":["Add an explicit <version> to the module's pom.xml","Fix the <parent> block so the parent resolves and supplies the inherited version","Ensure the parent POM is loadable and included in the workspace module tree","Check that version properties (e.g. ${revision}) are defined via -Drevision=... or a .mvn/maven.config file"],"exampleFix":"// before: mvn command without CI-friendly version\nmvn quarkus:dev\n// after: supply the placeholder\nmvn quarkus:dev -Drevision=1.0.0","handlingStrategy":"validation","validationCode":"Document pom = modelReader.read(pomFile.toFile(), null);\nboolean hasVersion = pom.getVersion() != null\n    || (pom.getParent() != null && pom.getParent().getVersion() != null);\nif (!hasVersion) throw new IllegalStateException(pomFile + \" has no resolvable version\");","typeGuard":null,"tryCatchPattern":"try {\n    String version = wsModulePom.getResolvedVersion();\n} catch (RuntimeException e) {\n    log.error(\"Add explicit <version> or supply CI-friendly properties: \" + e.getMessage());\n}","preventionTips":["Declare <version> explicitly or rely on a resolvable parent","Provide ${revision} etc. via -D or .mvn/maven.config in all environments","Verify parent coordinates resolve before building children","Run mvn validate in CI"],"tags":["maven","pom","version"],"backgroundTag":"missing-maven-version","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"}