{"record":{"id":"5f135b1c17b72d7a","repo":"apache/maven","slug":"specified-file-does-not-exists-file","errorCode":null,"errorMessage":"Specified file does not exists (${file})","messagePattern":"Specified file does not exists \\((.+?)\\)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/MavenParser.java","lineNumber":47,"sourceCode":"import org.apache.commons.cli.ParseException;\nimport org.apache.maven.api.cli.Options;\nimport org.apache.maven.api.cli.mvn.MavenOptions;\nimport org.apache.maven.cling.invoker.BaseParser;\n\npublic class MavenParser extends BaseParser {\n    @Override\n    protected Options parseCliOptions(LocalContext context) {\n        ArrayList<MavenOptions> result = new ArrayList<>();\n        // CLI args\n        MavenOptions cliOptions = parseMavenCliOptions(context.parserRequest.args());\n        result.add(cliOptions);\n        // atFile option\n        if (cliOptions.atFile().isPresent()) {\n            Path file = context.cwd.resolve(cliOptions.atFile().orElseThrow());\n            if (Files.isRegularFile(file)) {\n                result.add(parseMavenAtFileOptions(file));\n            } else {\n                throw new IllegalArgumentException(\"Specified file does not exists (\" + file + \")\");\n            }\n        }\n        // maven.config; if exists\n        Path mavenConfig = context.rootDirectory != null ? context.rootDirectory.resolve(\".mvn/maven.config\") : null;\n        if (mavenConfig != null && Files.isRegularFile(mavenConfig)) {\n            result.add(parseMavenConfigOptions(mavenConfig));\n        }\n        return LayeredMavenOptions.layerMavenOptions(result);\n    }\n\n    protected MavenOptions parseMavenCliOptions(List<String> args) {\n        try {\n            return parseArgs(Options.SOURCE_CLI, args);\n        } catch (ParseException e) {\n            throw new IllegalArgumentException(\"Failed to parse CLI arguments: \" + e.getMessage(), e.getCause());\n        }\n    }\n","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/MavenParser.java#L29-L65","documentation":"Error \"Specified file does not exists (${file})\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/MavenParser.java:47 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-22T04:17:13.399Z"}