{"record":{"id":"24f00944aff3eef6","repo":"quarkusio/quarkus","slug":"coords-does-not-follow-format-groupid-artifa","errorCode":null,"errorMessage":"${coords} does not follow format <groupId>:<artifactId>[:<classifier>[:<type>]]","messagePattern":"(.+?) does not follow format <groupId>:<artifactId>\\[:<classifier>\\[:<type>\\]\\]","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/app-model/src/main/java/io/quarkus/maven/dependency/GACT.java","lineNumber":43,"sourceCode":"    protected final String classifier;\n    protected final String type;\n\n    public GACT(String[] parts) {\n        if (parts == null || parts.length < 2 || parts.length > 4) {\n            final StringBuilder sb = new StringBuilder().append(\"Artifact key \");\n            if (parts == null) {\n                sb.append(\"null\");\n            } else {\n                sb.append('\\'');\n                if (parts.length > 0) {\n                    sb.append(parts[0]);\n                    for (int i = 1; i < parts.length; ++i) {\n                        sb.append(':').append(parts[i]);\n                    }\n                }\n                sb.append('\\'');\n            }\n            throw new IllegalArgumentException(\n                    sb.append(\" does not follow format <groupId>:<artifactId>[:<classifier>[:<type>]]\").toString());\n        }\n        this.groupId = parts[0];\n        this.artifactId = parts[1];\n        if (parts.length == 2 || parts[2] == null) {\n            this.classifier = ArtifactCoords.DEFAULT_CLASSIFIER;\n        } else {\n            this.classifier = parts[2];\n        }\n        if (parts.length <= 3 || parts[3] == null) {\n            this.type = ArtifactCoords.TYPE_JAR;\n        } else {\n            this.type = parts[3];\n        }\n    }\n\n    public GACT(String groupId, String artifactId) {\n        this(groupId, artifactId, null);","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/maven/dependency/GACT.java#L25-L61","documentation":"The GACT constructor parses a colon-separated coordinate string into groupId/artifactId/classifier/type (+version) and throws IllegalArgumentException when the string does not match <groupId>:<artifactId>[:<classifier>[:<type>]] shape. The message includes the offending input after the appended text.","triggerScenarios":"Constructing GACT (directly or via ArtifactCoords parsing that delegates to it) with strings that have a bad ':' placement: empty groupId, missing artifactId, or too many/few segments for the expected GACT shape.","commonSituations":"Hand-editing dependency coordinates in config; copying coords that include a version (6 segments G:A:C:T:V) into a GACT-only API; unresolved property placeholders leaving empty segments like \"com.acme::jar\".","solutions":["Provide coordinates in groupId:artifactId[:classifier][:type] form with non-empty groupId and artifactId","Remove version segments if the target API is GACT-only (version is handled by ArtifactCoords.split)","Resolve ${...} placeholders so no segment is empty","Pre-validate by splitting on ':' and checking the first two segments are non-empty"],"exampleFix":"// before\nnew GACT(\"com.acme::jar\", null); // throws\n// after\nnew GACT(\"com.acme:app:jar\", null);","handlingStrategy":"validation","validationCode":"boolean isValidGact(String s) {\n    String[] p = s == null ? new String[0] : s.split(\":\", -1);\n    return p.length >= 2 && p.length <= 4 && !p[0].isEmpty() && !p[1].isEmpty();\n}","typeGuard":null,"tryCatchPattern":"try {\n    ArtifactCoords c = new GACT(str, null);\n} catch (IllegalArgumentException e) {\n    log.error(\"Bad coordinates, expected G:A[:C[:T]]: \" + str);\n}","preventionTips":["Use ArtifactCoords factories instead of raw GACT construction","Keep version out of GACT strings; versions go through ArtifactCoords.parse","Check for empty segments caused by unresolved placeholders","Centralize coordinate parsing in one validated helper"],"tags":["parsing","maven-coordinates","format-validation"],"backgroundTag":"invalid-coordinate-format","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"}