quarkusio/quarkus · error · RuntimeException
Failed to determine the groupId of module
Error message
Failed to determine the groupId of module
What it means
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.
Source
Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/WorkspaceModulePom.java:122
}
final Model model = getModel();
if (model != null) {
String groupId = model.getGroupId();
if (groupId != null) {
return groupId;
}
Parent parent = model.getParent();
if (parent != null) {
groupId = parent.getGroupId();
if (groupId != null) {
return groupId;
}
}
}
if (parent != null) {
return parent.getResolvedGroupId();
}
throw new RuntimeException("Failed to determine the groupId of module " + pom);
}
/**
* Returns a resolved version value for this module, which may be inherited from a parent POM.
*
* @return resolved version value for this module
*/
String getResolvedVersion() {
if (effectiveModel != null) {
return effectiveModel.getVersion();
}
final Model model = getModel();
if (model != null) {
String version = ModelUtils.getRawVersionOrNull(model);
if (version != null && ModelUtils.isUnresolvedVersion(version)) {
version = ModelUtils.resolveVersion(version, model);
}
if (version != null) {View on GitHub (pinned to e1c734241f)
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>)
Example fix
<!-- before --> <project> <artifactId>app</artifactId> <version>1.0</version> </project> <!-- after --> <project> <groupId>com.acme</groupId> <artifactId>app</artifactId> <version>1.0</version> </project>
Defensive patterns
Strategy: validation
Validate before calling
Document pom = modelReader.read(pomFile.toFile(), null);
boolean hasGroup = pom.getGroupId() != null
|| (pom.getParent() != null && pom.getParent().getGroupId() != null);
if (!hasGroup) throw new IllegalStateException(pomFile + " has no resolvable groupId"); Try / catch
try {
String groupId = wsModulePom.getResolvedGroupId();
} catch (RuntimeException e) {
log.error("Add explicit <groupId> or fix the <parent> block: " + e.getMessage());
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unable to parse pom file: ${pom}
- Could not resolve POM for
- Unable to update the pom.xml file
- The parent project must have a packaging type of POM. Curren
- Unable to update the pom.xml file
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/2e0c0e2e413880b4.
Report an issue: GitHub.