{"record":{"id":"401d52c3ced82998","repo":"apache/maven","slug":"extension-conflicts-in-file-extensionfile-ga","errorCode":null,"errorMessage":"Extension conflicts in file ${extensionFile}: ${ga} defined on lines ${lineNumbers}","messagePattern":"Extension conflicts in file (.+?): (.+?) defined on lines (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java","lineNumber":548,"sourceCode":"            throw new IllegalArgumentException(\"Failed to parse extensions file: \" + extensionsFile, e);\n        }\n    }\n\n    protected List<CoreExtension> validateCoreExtensionsDescriptorFromFile(\n            Path extensionFile, List<CoreExtension> coreExtensions, boolean allowMetaVersions) {\n        Map<String, List<InputLocation>> gasLocations = new HashMap<>();\n        Map<String, List<InputLocation>> metaVersionLocations = new HashMap<>();\n        for (CoreExtension coreExtension : coreExtensions) {\n            String ga = coreExtension.getGroupId() + \":\" + coreExtension.getArtifactId();\n            InputLocation location = coreExtension.getLocation(\"\");\n            gasLocations.computeIfAbsent(ga, k -> new ArrayList<>()).add(location);\n            // TODO: metaversions could be extensible enum with these two values out of the box\n            if (\"LATEST\".equals(coreExtension.getVersion()) || \"RELEASE\".equals(coreExtension.getVersion())) {\n                metaVersionLocations.computeIfAbsent(ga, k -> new ArrayList<>()).add(location);\n            }\n        }\n        if (gasLocations.values().stream().anyMatch(l -> l.size() > 1)) {\n            throw new IllegalStateException(\"Extension conflicts in file \" + extensionFile + \": \"\n                    + gasLocations.entrySet().stream()\n                            .map(e -> e.getKey() + \" defined on lines \"\n                                    + e.getValue().stream()\n                                            .map(l -> String.valueOf(l.getLineNumber()))\n                                            .collect(Collectors.joining(\", \")))\n                            .collect(Collectors.joining(\"; \")));\n        }\n        if (!allowMetaVersions && !metaVersionLocations.isEmpty()) {\n            throw new IllegalStateException(\"Extension with illegal version in file \" + extensionFile + \": \"\n                    + metaVersionLocations.entrySet().stream()\n                            .map(e -> e.getKey() + \" defined on lines \"\n                                    + e.getValue().stream()\n                                            .map(l -> String.valueOf(l.getLineNumber()))\n                                            .collect(Collectors.joining(\", \")))\n                            .collect(Collectors.joining(\"; \")));\n        }\n        return coreExtensions;\n    }","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java#L530-L566","documentation":"Error \"Extension conflicts in file ${extensionFile}: ${ga} defined on lines ${lineNumbers}\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java:548 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}