{"record":{"id":"d0993a15a5b32cdc","repo":"apache/maven","slug":"only-fully-qualified-sets-allowed-in-multiple-set","errorCode":null,"errorMessage":"Only fully-qualified sets allowed in multiple set scenario: {}","messagePattern":"Only fully-qualified sets allowed in multiple set scenario: (.+?)","errorType":"validation","errorClass":"InvalidVersionSpecificationException","httpStatus":null,"severity":"warning","filePath":"compat/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java","lineNumber":148,"sourceCode":"            if (upperBound != null) {\n                if (restriction.getLowerBound() == null\n                        || restriction.getLowerBound().compareTo(upperBound) < 0) {\n                    throw new InvalidVersionSpecificationException(\"Ranges overlap: \" + spec);\n                }\n            }\n            restrictions.add(restriction);\n            upperBound = restriction.getUpperBound();\n\n            process = process.substring(index + 1).trim();\n\n            if (process.startsWith(\",\")) {\n                process = process.substring(1).trim();\n            }\n        }\n\n        if (!process.isEmpty()) {\n            if (!restrictions.isEmpty()) {\n                throw new InvalidVersionSpecificationException(\n                        \"Only fully-qualified sets allowed in multiple set scenario: \" + spec);\n            } else {\n                version = new DefaultArtifactVersion(process);\n                restrictions.add(Restriction.EVERYTHING);\n            }\n        }\n\n        cached = new VersionRange(version, restrictions);\n        CACHE_SPEC.put(spec, cached);\n        return cached;\n    }\n\n    private static Restriction parseRestriction(String spec) throws InvalidVersionSpecificationException {\n        boolean lowerBoundInclusive = spec.startsWith(\"[\");\n        boolean upperBoundInclusive = spec.endsWith(\"]\");\n\n        String process = spec.substring(1, spec.length() - 1).trim();\n","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/compat/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java#L130-L166","documentation":"Building the effective toolchains (user plus installation/project toolchains.xml) produced Problem entries. Maven prints this header followed by one 'message @ location' line per problem, then continues with whatever toolchains could be merged. A misdeclared toolchain can later fail to match a <toolchain> requirement in a plugin, silently falling back to default JDK/tool selection.","triggerScenarios":"A toolchains.xml that is malformed, uses unknown elements, or declares a toolchain missing required fields (for example a jdk toolchain without a jdkHome).","commonSituations":"Hand-edited ~/.m2/toolchains.xml after JDK updates; CI provisioning toolchains files via templates with unfilled placeholders; conflicting user and project toolchains files.","solutions":["Read each following 'message @ location' line to find the exact file and position","Fix the reported entry in the toolchains.xml (usually ~/.m2/toolchains.xml or .mvn/toolchains.xml)","Validate shape: xmllint --noout on the file; ensure each <toolchain> has <type> and the type-specific fields","Re-run mvn and confirm the warning block disappears before relying on toolchain selection"],"exampleFix":"<!-- before -->\n<toolchains>\n  <toolchain>\n    <type>jdk</type>\n    <provides><version>17</version></provides>\n  </toolchain>\n</toolchains>\n<!-- after: required jdkHome present -->\n<toolchains>\n  <toolchain>\n    <type>jdk</type>\n    <provides><version>17</version></provides>\n    <configuration><jdkHome>/usr/lib/jvm/java-17</jdkHome></configuration>\n  </toolchain>\n</toolchains>","handlingStrategy":"validation","validationCode":"xmllint --noout ~/.m2/toolchains.xml 2>/dev/null\nxmllint --noout .mvn/toolchains.xml 2>/dev/null\necho 'toolchains XML validated'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate toolchains.xml with provisioning scripts instead of hand-editing","Validate toolchains files in CI before the build stage","Keep toolchain entries minimal: type plus the required home element"],"tags":["maven","toolchains","configuration","maven-embedder"],"backgroundTag":"toolchains-xml-invalid","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}