{"record":{"id":"5e69815cf43df970","repo":"projectlombok/lombok","slug":"message-run-java-jar-lombok-jar-format-help","errorCode":null,"errorMessage":"${message} Run java -jar lombok.jar --format-help for detailed format help.","messagePattern":"(.+?) Run java -jar lombok\\.jar --format-help for detailed format help\\.","errorType":"exception","errorClass":"BuildException","httpStatus":null,"severity":"error","filePath":"src/delombok/lombok/delombok/ant/DelombokTaskImpl.java","lineNumber":69,"sourceCode":"\t\tif (fromDir != null && path != null) throw new BuildException(\"You can't specify both 'from' attribute and nested filesets. You need one or the other.\");\n\t\tif (toDir == null) throw new BuildException(\"The to attribute is required.\");\n\t\t\n\t\tDelombok delombok = new Delombok();\n\t\tif (verbose) delombok.setVerbose(true);\n\t\ttry {\n\t\t\tif (encoding != null) delombok.setCharset(encoding);\n\t\t} catch (UnsupportedCharsetException e) {\n\t\t\tthrow new BuildException(\"Unknown charset: \" + encoding, location);\n\t\t}\n\t\t\n\t\tif (classpath != null) delombok.setClasspath(classpath.toString());\n\t\tif (sourcepath != null) delombok.setSourcepath(sourcepath.toString());\n\t\tif (modulepath != null) delombok.setModulepath(modulepath.toString());\n\t\t\n\t\ttry {\n\t\t\tdelombok.setFormatPreferences(Delombok.formatOptionsToMap(formatOptions));\n\t\t} catch (InvalidFormatOptionException e) {\n\t\t\tthrow new BuildException(e.getMessage() + \" Run java -jar lombok.jar --format-help for detailed format help.\");\n\t\t}\n\t\t\n\t\tdelombok.setOutput(toDir);\n\t\ttry {\n\t\t\tif (fromDir != null) delombok.addDirectory(fromDir);\n\t\t\telse {\n\t\t\t\tIterator<?> it = path.iterator();\n\t\t\t\twhile (it.hasNext()) {\n\t\t\t\t\tFileResource fileResource = (FileResource) it.next();\n\t\t\t\t\tFile baseDir = fileResource.getBaseDir();\n\t\t\t\t\tif (baseDir == null) {\n\t\t\t\t\t\tFile file = fileResource.getFile();\n\t\t\t\t\t\tdelombok.addFile(file.getParentFile(), file.getName());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdelombok.addFile(baseDir, fileResource.getName());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/projectlombok/lombok/blob/6d6a3e9fec0a9555702561fbeb8eac836575116e/src/delombok/lombok/delombok/ant/DelombokTaskImpl.java#L51-L87","documentation":"The Ant task converts its `<format>` elements to a format-preferences map via `Delombok.formatOptionsToMap`. If an option name/value is not recognized, that method throws InvalidFormatOptionException; the task wraps it in a BuildException appending a pointer to `java -jar lombok.jar --format-help`.","triggerScenarios":"A nested `<format name=\"someUnknownKey\" value=\"...\"/>` or a `key:value` string whose value is illegal, passed to `setFormatPreferences` inside `execute`. Also occurs when the format option string is malformed (missing ':').","commonSituations":"Typos in option names (`indent` vs `indentation`); reusing options from other tools (e.g. google-java-format flags); upgrading lombok and using an option that was renamed or removed.","solutions":["Run `java -jar lombok.jar --format-help` and use only listed option names/values","Fix the option string to the `name:value` form with a valid value","Remove unknown `<format>` elements; check the lombok version your Ant task runs against (rename/remove stale options)"],"exampleFix":"<!-- before -->\n<delombok from=\"src\" to=\"out\">\n  <format name=\"indentation\" value=\"4\"/>\n</delombok>\n<!-- after -->\n<delombok from=\"src\" to=\"out\">\n  <format name=\"indent\" value=\"4\"/>\n</delombok>","handlingStrategy":"try-catch","validationCode":"Map<String,String> opts = Delombok.formatOptionsToMap(formatOptions); // run once at build-authoring time to validate","typeGuard":null,"tryCatchPattern":"try {\n    delombok.setFormatPreferences(Delombok.formatOptionsToMap(formatOptions));\n} catch (InvalidFormatOptionException e) {\n    throw new BuildException(e.getMessage() + \" Run java -jar lombok.jar --format-help for detailed format help.\");\n}","preventionTips":["Validate format options with --format-help for your lombok version","Keep format options minimal and reviewed","Re-check options when upgrading lombok (options can change)"],"tags":["ant","format-options","configuration","build"],"backgroundTag":"invalid-config-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"}