{"record":{"id":"fc3517fcddb155ee","repo":"quarkusio/quarkus","slug":"invalid-codestartdep-expression-expression","errorCode":null,"errorMessage":"Invalid CodestartDep expression: + expression","messagePattern":"Invalid CodestartDep expression: \\+ expression","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/core/CodestartSpec.java","lineNumber":141,"sourceCode":"        }\n    }\n\n    public static class CodestartDep extends HashMap<String, String> {\n\n        private static final String GROUP_ID = \"groupId\";\n        private static final String ARTIFACT_ID = \"artifactId\";\n        private static final String VERSION = \"version\";\n        private static final String FORMATTED_GAV = \"formatted-gav\";\n        private static final String FORMATTED_GA = \"formatted-ga\";\n\n        public CodestartDep() {\n        }\n\n        @JsonCreator(mode = JsonCreator.Mode.DELEGATING)\n        public CodestartDep(final String expression) {\n            final String[] split = expression.split(\":\");\n            if (split.length < 2) {\n                throw new IllegalArgumentException(\"Invalid CodestartDep expression: \" + expression);\n            }\n            this.put(GROUP_ID, split[0]);\n            this.put(ARTIFACT_ID, split[1]);\n\n            if (split.length == 3) {\n                this.put(VERSION, split[2]);\n                this.put(FORMATTED_GA, split[0] + \":\" + split[1]);\n            } else {\n                this.put(FORMATTED_GA, expression);\n            }\n            this.put(FORMATTED_GAV, expression);\n\n        }\n\n        public String getGroupId() {\n            return this.get(GROUP_ID);\n        }\n","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/core/CodestartSpec.java#L123-L159","documentation":"CodestartDep is parsed from a Maven-style 'groupId:artifactId[:version]' string expression via a Jackson @JsonCreator. This error means the expression had fewer than two colon-separated parts, so no group/artifact coordinates could be extracted. It is an IllegalArgumentException from malformed codestart YAML data.","triggerScenarios":"A codestart YAML 'dependencies' entry contains a single token without ':' (e.g. just an artifact name), and Jackson deserializes the codestart spec into CodestartDep.","commonSituations":"Hand-written codestart dependency lists with shorthand names; missing version produced ':' splitting issues; copy-paste of dependency strings into YAML without quoting (leading YAML to strip structure) — note also YAML specials like ':' need quoting.","solutions":["Write the dependency as groupId:artifactId (version optional): e.g. io.quarkus:quarkus-jdbc-postgresql","Quote the expression in YAML ('\"com.example:lib:1.0\"') so colon parsing is preserved","Validate the codestart YAML dependencies entries before loading"],"exampleFix":"# before\ndependencies:\n  - quarkus-jdbc-postgresql\n# after\ndependencies:\n  - \"io.quarkus:quarkus-jdbc-postgresql\"","handlingStrategy":"validation","validationCode":"if (expr == null || expr.split(\":\").length < 2)\n    throw new IllegalArgumentException(\"Dep must be groupId:artifactId[:version]\");","typeGuard":"boolean isDepExpr(Object v) { return v instanceof String && ((String) v).split(\":\").length >= 2; }","tryCatchPattern":"try { mapper.readValue(yaml, CodestartSpec.class); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Invalid CodestartDep expression\")) { /* fix entry */ } else throw e;\n}","preventionTips":["Use groupId:artifactId[:version] format","Quote YAML values containing colons","Lint codestart dependency entries"],"tags":["yaml","parsing","codestart","maven-coordinates"],"backgroundTag":"invalid-dependency-expression","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}