apache/maven · error · IllegalStateException
Extension with illegal version in file ${extensionFile}: ${g
Error message
Extension with illegal version in file ${extensionFile}: ${ga} defined on lines ${lineNumbers} What it means
Error "Extension with illegal version in file ${extensionFile}: ${ga} defined on lines ${lineNumbers}" thrown in apache/maven.
Source
Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java:557
String ga = coreExtension.getGroupId() + ":" + coreExtension.getArtifactId();
InputLocation location = coreExtension.getLocation("");
gasLocations.computeIfAbsent(ga, k -> new ArrayList<>()).add(location);
// TODO: metaversions could be extensible enum with these two values out of the box
if ("LATEST".equals(coreExtension.getVersion()) || "RELEASE".equals(coreExtension.getVersion())) {
metaVersionLocations.computeIfAbsent(ga, k -> new ArrayList<>()).add(location);
}
}
if (gasLocations.values().stream().anyMatch(l -> l.size() > 1)) {
throw new IllegalStateException("Extension conflicts in file " + extensionFile + ": "
+ gasLocations.entrySet().stream()
.map(e -> e.getKey() + " defined on lines "
+ e.getValue().stream()
.map(l -> String.valueOf(l.getLineNumber()))
.collect(Collectors.joining(", ")))
.collect(Collectors.joining("; ")));
}
if (!allowMetaVersions && !metaVersionLocations.isEmpty()) {
throw new IllegalStateException("Extension with illegal version in file " + extensionFile + ": "
+ metaVersionLocations.entrySet().stream()
.map(e -> e.getKey() + " defined on lines "
+ e.getValue().stream()
.map(l -> String.valueOf(l.getLineNumber()))
.collect(Collectors.joining(", ")))
.collect(Collectors.joining("; ")));
}
return coreExtensions;
}
@Nullable
protected CIInfo detectCI(LocalContext context) {
List<CIInfo> detected = CIDetectorHelper.detectCI();
if (detected.isEmpty()) {
return null;
} else if (detected.size() > 1) {
// warn
context.parserRequestView on GitHub (pinned to e4093d4e12)
When it happens
Trigger: Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java:557 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/d12824e3a7144abe.
Report an issue: GitHub.