{"record":{"id":"a8d6d79894cd70b3","repo":"apache/maven","slug":"local-mode-requires-maven-home-java-system-propert","errorCode":null,"errorMessage":"local mode requires maven.home Java System Property set","messagePattern":"local mode requires maven\\.home Java System Property set","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java","lineNumber":291,"sourceCode":"            Path result = getCanonicalPath(context.parserRequest.cwd());\n            context.systemPropertiesOverrides.put(\"user.dir\", result.toString());\n            return result;\n        } else {\n            Path result = getCanonicalPath(Paths.get(System.getProperty(\"user.dir\")));\n            mayOverrideDirectorySystemProperty(context, \"user.dir\", result);\n            return result;\n        }\n    }\n\n    protected Path getInstallationDirectory(LocalContext context) {\n        if (context.parserRequest.mavenHome() != null) {\n            Path result = getCanonicalPath(context.parserRequest.mavenHome());\n            context.systemPropertiesOverrides.put(Constants.MAVEN_HOME, result.toString());\n            return result;\n        } else {\n            String mavenHome = System.getProperty(Constants.MAVEN_HOME);\n            if (mavenHome == null) {\n                throw new IllegalStateException(\n                        \"local mode requires \" + Constants.MAVEN_HOME + \" Java System Property set\");\n            }\n            Path result = getCanonicalPath(Paths.get(mavenHome));\n            mayOverrideDirectorySystemProperty(context, Constants.MAVEN_HOME, result);\n            return result;\n        }\n    }\n\n    protected Path getUserHomeDirectory(LocalContext context) {\n        if (context.parserRequest.userHome() != null) {\n            Path result = getCanonicalPath(context.parserRequest.userHome());\n            context.systemPropertiesOverrides.put(\"user.home\", result.toString());\n            return result;\n        } else {\n            Path result = getCanonicalPath(Paths.get(System.getProperty(\"user.home\")));\n            mayOverrideDirectorySystemProperty(context, \"user.home\", result);\n            return result;\n        }","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java#L273-L309","documentation":"Error \"local mode requires maven.home Java System Property set\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/BaseParser.java:291 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"}