{"record":{"id":"481556d61c3664a2","repo":"elastic/elasticsearch","slug":"unknown-vendor-vendor-for-jdk-name-must","errorCode":null,"errorMessage":"unknown vendor [${vendor}] for jdk [${name}], must be one of ${ALLOWED_VENDORS}","messagePattern":"unknown vendor \\[(.+?)\\] for jdk \\[(.+?)\\], must be one of (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/Jdk.java","lineNumber":72,"sourceCode":"        this.configuration = configuration;\n        this.vendor = objectFactory.property(String.class);\n        this.version = objectFactory.property(String.class);\n        this.platform = objectFactory.property(String.class);\n        this.architecture = objectFactory.property(String.class);\n        this.distributionVersion = objectFactory.property(String.class);\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public String getVendor() {\n        return vendor.get();\n    }\n\n    public void setVendor(final String vendor) {\n        if (ALLOWED_VENDORS.contains(vendor) == false) {\n            throw new IllegalArgumentException(\"unknown vendor [\" + vendor + \"] for jdk [\" + name + \"], must be one of \" + ALLOWED_VENDORS);\n        }\n        this.vendor.set(vendor);\n    }\n\n    public String getVersion() {\n        return version.get();\n    }\n\n    public void setVersion(String version) {\n        if (VERSION_PATTERN.matcher(version).matches() == false\n            && LEGACY_VERSION_PATTERN.matcher(version).matches() == false\n            && EA_VERSION_PATTERN.matcher(version).matches() == false) {\n            throw new IllegalArgumentException(\"malformed version [\" + version + \"] for jdk [\" + name + \"]\");\n        }\n        parseVersion(version);\n        this.version.set(version);\n    }\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/Jdk.java#L54-L90","documentation":"Thrown by Jdk.setVendor when the supplied vendor string is not in the ALLOWED_VENDORS allowlist (adoptium, openjdk, zulu). The Jdk object models a downloadable JDK bundle for the build; the vendor drives which Ivy repository URL and artifact pattern JdkDownloadPlugin selects, so an unrecognized vendor cannot be resolved to a download source.","triggerScenarios":"Calling Jdk.setVendor(vendor) (or configuring jdks { myjdk { vendor = '...' } } in a Gradle script) with a value not equal to 'adoptium', 'openjdk', or 'zulu'. The check is ALLOWED_VENDORS.contains(vendor) == false.","commonSituations":"Typing a vendor name (e.g. 'oracle', 'temurin', 'azul', 'redhat', 'microsoft'); using a legacy vendor identifier from an older Elasticsearch version; copy-pasting a vendor from documentation for a different build system; trailing whitespace or case mismatch (the comparison is case-sensitive).","solutions":["Set the vendor to one of the allowed values: 'adoptium', 'openjdk', or 'zulu' (for JDK 8 on macOS Apple Silicon only).","Prefer 'adoptium' for current JDK distributions; use 'openjdk' for Oracle/OpenJDK builds; use 'zulu' only for the JDK 8 aarch64 macOS case.","Check for trailing whitespace or wrong case in the vendor assignment."],"exampleFix":"// before\njdks { bundler { vendor = 'temurim'; } }\n// after\njdks { bundler { vendor = 'adoptium'; } }","handlingStrategy":"validation","validationCode":"import java.util.List;\nfinal List<String> ALLOWED_VENDORS = List.of(\"adoptium\", \"openjdk\", \"zulu\");\nvoid setJdkVendor(String vendor) {\n    if (!ALLOWED_VENDORS.contains(vendor)) {\n        throw new IllegalArgumentException(\n            \"vendor must be one of \" + ALLOWED_VENDORS + \", got: \" + vendor);\n    }\n    // ... proceed\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reference the published ALLOWED_VENDORS list before assigning a vendor.","Prefer 'adoptium' for general use; reserve 'zulu' for JDK 8 on macOS Apple Silicon.","Validate vendor/platform/architecture/version together in one place to surface all config errors early."],"tags":["gradle","jdk","build-config","validation","vendor"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}