{"record":{"id":"fcb533e3082eba1a","repo":"quarkusio/quarkus","slug":"one-of-type-version-or-separating-them-is-mis","errorCode":null,"errorMessage":"One of type, version or separating them ':' is missing from '${str}'","messagePattern":"One of type, version or separating them ':' is missing from '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/app-model/src/main/java/io/quarkus/maven/ArtifactCoords.java","lineNumber":28,"sourceCode":" * WARNING: DO NOT USE THIS CLASS\n * <p>\n *\n * @deprecated in favor of {@link io.quarkus.maven.dependency.ArtifactCoords}\n */\npublic class ArtifactCoords implements io.quarkus.maven.dependency.ArtifactCoords, Serializable {\n\n    public static ArtifactCoords fromString(String str) {\n        return new ArtifactCoords(split(str, new String[5]));\n    }\n\n    public static ArtifactCoords pom(String groupId, String artifactId, String version) {\n        return new ArtifactCoords(groupId, artifactId, ArtifactCoords.DEFAULT_CLASSIFIER, TYPE_POM, version);\n    }\n\n    protected static String[] split(String str, String[] parts) {\n        final int versionSep = str.lastIndexOf(':');\n        if (versionSep <= 0 || versionSep == str.length() - 1) {\n            throw new IllegalArgumentException(\"One of type, version or separating them ':' is missing from '\" + str + \"'\");\n        }\n        parts[4] = str.substring(versionSep + 1);\n        return GACT.split(str, parts, versionSep);\n    }\n\n    protected final String groupId;\n    protected final String artifactId;\n    protected final String classifier;\n    protected final String type;\n    protected final String version;\n\n    protected transient ArtifactKey key;\n\n    protected ArtifactCoords(String[] parts) {\n        groupId = parts[0];\n        artifactId = parts[1];\n        classifier = parts[2];\n        type = parts[3] == null ? TYPE_JAR : parts[3];","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/maven/ArtifactCoords.java#L10-L46","documentation":"ArtifactCoords.split locates the version by the last ':' and requires at least one character before it and after it. It throws IllegalArgumentException when the version separator ':' is missing entirely, is the first character, or is the last character of the string — meaning type and/or version cannot be determined.","triggerScenarios":"Calling ArtifactCoords.fromString / GACTV parsing helpers with strings like \"com.acme:app\" (no version), \"com.acme:app:\" (trailing colon), or \":1.0\" (leading colon).","commonSituations":"Users supply dependency strings copied from BOM entries or property placeholders that lost their version (e.g. \"${group}:${artifact}:\" unresolved); config values with trailing whitespace stripped incorrectly; hand-written coords omitting the version.","solutions":["Include a version as the segment after the last ':' (groupId:artifactId[:classifier][:type]:version)","Resolve any property placeholders (${...}) before parsing","Pre-validate with str.lastIndexOf(':') > 0 && < str.length() - 1","If only a GAV is known, use a GAV-only API (WorkspaceModuleId) instead of full ArtifactCoords"],"exampleFix":"// before\nArtifactCoords c = ArtifactCoords.fromString(\"com.acme:app\"); // throws\n// after\nArtifactCoords c = ArtifactCoords.fromString(\"com.acme:app:jar:1.0.0\");","handlingStrategy":"validation","validationCode":"boolean hasVersionSegment(String s) {\n    int i = s == null ? -1 : s.lastIndexOf(':');\n    return i > 0 && i < s.length() - 1;\n}","typeGuard":null,"tryCatchPattern":"try {\n    ArtifactCoords c = ArtifactCoords.fromString(str);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\":' is missing\")) {\n        throw new IllegalArgumentException(\"Append a version, e.g. \" + str + \":1.0.0\");\n    }\n}","preventionTips":["Never hand-build coordinate strings without a version","Resolve ${...} placeholders before parsing coordinates","Use Builder-style APIs (ArtifactCoords.of(g,a,c,t,v)) rather than string parsing","Trim whitespace; trailing spaces can push ':' to the last position"],"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-14T00:17:10.932Z"}