{"record":{"id":"ea19c5370499b323","repo":"apache/maven","slug":"ranges-overlap","errorCode":null,"errorMessage":"Ranges overlap: {}","messagePattern":"Ranges overlap: (.+?)","errorType":"validation","errorClass":"InvalidVersionSpecificationException","httpStatus":null,"severity":"warning","filePath":"compat/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java","lineNumber":133,"sourceCode":"            int index = index2;\n            if (index2 < 0 || index1 < index2) {\n                if (index1 >= 0) {\n                    index = index1;\n                }\n            }\n\n            if (index < 0) {\n                throw new InvalidVersionSpecificationException(\"Unbounded range: \" + spec);\n            }\n\n            Restriction restriction = parseRestriction(process.substring(0, index + 1));\n            if (lowerBound == null) {\n                lowerBound = restriction.getLowerBound();\n            }\n            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);","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/compat/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java#L115-L151","documentation":"maven.ext.class.path was found among the JVM system properties, meaning the value came from -D on the java command line (MAVEN_OPTS or JAVA_TOOL_OPTIONS) rather than from Maven user properties. That route is deprecated; the supported locations are a -D argument on the mvn command line (user properties) or ${session.rootDirectory}/.mvn/maven-user.properties.","triggerScenarios":"export MAVEN_OPTS='-Dmaven.ext.class.path=/path/to/ext.jar' before running mvn, or the same property injected through JAVA_TOOL_OPTIONS by CI infrastructure.","commonSituations":"Docker images and CI templates baking Maven tuning into MAVEN_OPTS; teams moving from old Maven versions where system properties were the only option.","solutions":["Pass it as a Maven argument: mvn -Dmaven.ext.class.path=/path/to/ext.jar ...","Or persist it in .mvn/maven-user.properties at the project root, the documented location","Remove the -D from MAVEN_OPTS and JAVA_TOOL_OPTIONS so it is no longer read as a system property"],"exampleFix":"# before\nexport MAVEN_OPTS=-Dmaven.ext.class.path=/tmp/extensions/my-ext.jar\nmvn clean verify\n# after: passed as a Maven user property\nmvn -Dmaven.ext.class.path=/tmp/extensions/my-ext.jar clean verify\n# or persisted in .mvn/maven-user.properties:\n# maven.ext.class.path=/tmp/extensions/my-ext.jar","handlingStrategy":"validation","validationCode":"case $MAVEN_OPTS$JAVA_TOOL_OPTIONS in\n  *maven.ext.class.path*)\n    echo 'move -Dmaven.ext.class.path to the mvn command line or .mvn/maven-user.properties'\n    exit 1 ;;\nesac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep Maven tuning properties in .mvn/maven-user.properties under version control","Never set maven.* properties via MAVEN_OPTS -D","Document the project's .mvn directory in the README so new contributors use it"],"tags":["maven","cli","system-property","deprecation","maven-embedder"],"backgroundTag":"deprecated-system-property","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}