{"record":{"id":"e6e89c02e6deb480","repo":"projectlombok/lombok","slug":"4th-argument-must-be-one-of-all-changelog-d","errorCode":null,"errorMessage":"4th argument must be one of 'all', 'changelog', 'download-edge', 'changelog-latest'","messagePattern":"4th argument must be one of 'all', 'changelog', 'download-edge', 'changelog-latest'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/support/lombok/website/WebsiteMaker.java","lineNumber":215,"sourceCode":"\t\t\tfullVersion = args[2];\n\t\t}\n\t\t\n\t\tString argIn = args.length < 5 ? null : args[4];\n\t\tString argOut = args.length < 6 ? null : args[5];\n\t\tif (args.length < 4 || args[3].equalsIgnoreCase(\"all\")) {\n\t\t\tbuildAll(domain, version, fullVersion, argIn, argOut, false);\n\t\t} else if (args.length < 4 || args[3].equalsIgnoreCase(\"all-newrelease\")) {\n\t\t\tbuildAll(domain, version, fullVersion, argIn, argOut, true);\n\t\t} else if (args[3].equalsIgnoreCase(\"changelog\")) {\n\t\t\tbuildChangelog(version, fullVersion, argIn, argOut);\n\t\t} else if (args[3].equalsIgnoreCase(\"download-edge\")) {\n\t\t\tbuildDownloadEdge(version, fullVersion, argIn, argOut);\n\t\t} else if (args[3].equalsIgnoreCase(\"changelog-latest\")) {\n\t\t\tbuildChangelogLatest(version, fullVersion, argIn, argOut);\n\t\t} else if (args[3].equalsIgnoreCase(\"print-allversions\")) {\n\t\t\tprintAllVersions(domain);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"4th argument must be one of 'all', 'changelog', 'download-edge', 'changelog-latest'\");\n\t\t}\n\t}\n\t\n\tprivate Configuration makeFreemarkerConfig() throws IOException {\n\t\tConfiguration freemarkerConfig = new Configuration(Configuration.VERSION_2_3_25);\n\t\tfreemarkerConfig.setEncoding(Locale.ENGLISH, \"UTF-8\");\n\t\tfreemarkerConfig.setOutputEncoding(\"UTF-8\");\n\t\tfreemarkerConfig.setOutputFormat(HTMLOutputFormat.INSTANCE);\n\t\tfreemarkerConfig.setTemplateLoader(createLoader());\n\t\tfreemarkerConfig.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\n\t\treturn freemarkerConfig;\n\t}\n\t\n\tpublic void buildChangelog(File out) throws Exception {\n\t\tConfiguration freemarkerConfig = makeFreemarkerConfig();\n\t\toutputDir.mkdirs();\n\t\tconvertChangelog(freemarkerConfig, out);\n\t}","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/projectlombok/lombok/blob/6d6a3e9fec0a9555702561fbeb8eac836575116e/src/support/lombok/website/WebsiteMaker.java#L197-L233","documentation":"WebsiteMaker.main dispatches on args[3] (the 4th CLI argument) with equalsIgnoreCase against the known website build modes ('all', 'changelog', 'download-edge', 'changelog-latest', plus 'print-allversions'). An unrecognized value throws this IllegalArgumentException. Note the message list omits 'print-allversions', which is also accepted.","triggerScenarios":"Invoking WebsiteMaker with an args[3] value other than the recognized modes — typo (e.g. 'Download'), renamed/moved mode, argument order mistake so a version string lands in position 3.","commonSituations":"Hand-typing the website build command in a release script; scripts copied from older docs using a mode name that no longer exists; swapped arguments after editing the command line.","solutions":["Set the 4th argument to one of: 'all', 'changelog', 'download-edge', 'changelog-latest' (case-insensitive) — 'print-allversions' also works despite not being listed in the message.","Check argument order: argIn/argOut/version must precede the mode argument.","Fix typos in your release script or wrapper (e.g. 'changelogs' -> 'changelog').","Compare with the invocation documented in the repo's release/publish scripts."],"exampleFix":"// before\njava WebsiteMaker <in> <out> 1.18.30 downloadEdge\n// after\njava WebsiteMaker <in> <out> 1.18.30 download-edge","handlingStrategy":"validation","validationCode":"java.util.Set<String> modes = java.util.Set.of(\"all\", \"changelog\", \"download-edge\", \"changelog-latest\", \"print-allversions\");\nif (!modes.contains(args[3].toLowerCase(java.util.Locale.ROOT))) throw new IllegalArgumentException(\"mode must be one of \" + modes);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy the website build command from the repo's release scripts instead of retyping it.","Remember 'print-allversions' is also accepted even though the message omits it.","Check argument order: mode must land exactly at args[3].","Mode matching is case-insensitive but spelling must match ('download-edge', not 'downloadEdge')."],"tags":["cli","invalid-argument","java"],"backgroundTag":"invalid-enum-value","analyzedSha":"6d6a3e9fec0a9555702561fbeb8eac836575116e","analyzedAt":"2026-09-07T23:18:01.841Z","contentChangedAt":"2026-09-07T23:18:01.841Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}