{"record":{"id":"bcf3bc13e8ca96ab","repo":"quarkusio/quarkus","slug":"failed-to-resolve-required-property-name","errorCode":null,"errorMessage":"Failed to resolve required property <name>","messagePattern":"Failed to resolve required property <name>","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java","lineNumber":36,"sourceCode":"\nimport io.quarkus.bootstrap.BootstrapConstants;\nimport io.quarkus.bootstrap.resolver.AppModelResolver;\nimport io.quarkus.bootstrap.resolver.BootstrapAppModelResolver;\nimport io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver;\nimport io.quarkus.devtools.messagewriter.MessageWriter;\nimport io.quarkus.maven.dependency.ArtifactCoords;\nimport io.quarkus.registry.CatalogMergeUtility;\nimport io.quarkus.registry.Constants;\nimport io.quarkus.registry.catalog.ExtensionCatalog;\nimport io.quarkus.registry.catalog.selection.OriginPreference;\nimport io.quarkus.registry.util.PlatformArtifacts;\n\npublic class ToolsUtils {\n\n    public static String requireProperty(String name) {\n        final String value = getProperty(name);\n        if (value == null) {\n            throw new IllegalStateException(\"Failed to resolve required property \" + name);\n        }\n        return value;\n    }\n\n    public static String getProperty(String name) {\n        return getProperty(name, null);\n    }\n\n    public static String getProperty(String name, String defaultValue) {\n        return System.getProperty(name, defaultValue);\n    }\n\n    public static Map<String, String> stringToMap(\n            String str, String entrySeparator, String keyValueSeparator) {\n        HashMap<String, String> result = new HashMap<>();\n        for (String entry : StringUtils.splitByWholeSeparator(str, entrySeparator)) {\n            String[] pair = StringUtils.splitByWholeSeparator(entry, keyValueSeparator, 2);\n","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java#L18-L54","documentation":"ToolsUtils.requireProperty looks up a required system/environment property and throws IllegalStateException if it is absent. This signals that a mandatory configuration input (typically a Quarkus tool property like quarkus.platform.* or registry settings) was not provided to the tool.","triggerScenarios":"Calling requireProperty(name) where getProperty(name) returns null: the system property is not set on the command line, the environment variable backing it is missing, or the properties file was not loaded.","commonSituations":"Running quarkus-maven-plugin / CLI goals without -D flags; CI environments missing exported variables that exist locally; Maven settings not passing properties through plugin configuration.","solutions":["Set the property explicitly, e.g. -D<name>=<value> on the Maven/Java command line","Export the corresponding environment variable in your shell/CI environment","Check Maven settings.xml / plugin <properties> configuration for the missing key"],"exampleFix":"// before\nmvn quarkus:create-extension   # missing required property\n// after\nmvn quarkus:create-extension -Dquarkus.platform.version=3.2.0.Final","handlingStrategy":"try-catch","validationCode":"String val = ToolsUtils.getProperty(\"quarkus.platform.version\");\nif (val == null || val.isBlank()) {\n    throw new IllegalStateException(\"Set -Dquarkus.platform.version before invoking tooling\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    String v = ToolsUtils.requireProperty(\"quarkus.platform.version\");\n} catch (IllegalStateException e) {\n    // e.getMessage() names the missing property; fail fast with guidance\n    throw new IllegalStateException(e.getMessage() + \" — pass it via -D or env var\", e);\n}","preventionTips":["Pass all -D properties in CI scripts, not just locally","Document required properties next to tool invocations","Prefer explicit plugin <properties> configuration over reliance on ambient env vars"],"tags":["configuration","missing-property","environment"],"backgroundTag":"missing-env-var","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}