{"record":{"id":"cd9dbb4f7473a1ee","repo":"apache/maven","slug":"failed-to-parse-extensions-file-extensionsfile","errorCode":null,"errorMessage":"Failed to parse extensions file: ${extensionsFile}","messagePattern":"Failed to parse extensions file: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java","lineNumber":530,"sourceCode":"\n        return result.isEmpty() ? null : List.copyOf(result);\n    }\n\n    protected List<CoreExtension> readCoreExtensionsDescriptorFromFile(Path extensionsFile, boolean allowMetaVersions) {\n        try {\n            if (extensionsFile != null && Files.exists(extensionsFile)) {\n                try (InputStream is = Files.newInputStream(extensionsFile)) {\n                    return validateCoreExtensionsDescriptorFromFile(\n                            extensionsFile,\n                            List.copyOf(new CoreExtensionsStaxReader()\n                                    .read(is, true, InputSource.of(extensionsFile.toString()))\n                                    .getExtensions()),\n                            allowMetaVersions);\n                }\n            }\n            return List.of();\n        } catch (XMLStreamException | IOException e) {\n            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 + \": \"","sourceCodeStart":512,"sourceCodeEnd":548,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java#L512-L548","documentation":"Error \"Failed to parse extensions file: ${extensionsFile}\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java:530 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"}