{"record":{"id":"a6e1b3026cb5ec83","repo":"quarkusio/quarkus","slug":"the-specified-s-identifier-s-contains-invalid","errorCode":null,"errorMessage":"The specified %s identifier (%s) contains invalid characters. Valid characters are alphanumeric characters (A-Za-z0-9), underscores, dashes and dots.","messagePattern":"The specified (.+?) identifier \\((.+?)\\) contains invalid characters\\. Valid characters are alphanumeric characters \\(A-Za-z0-9\\), underscores, dashes and dots\\.","errorType":"validation","errorClass":"TypeConversionException","httpStatus":null,"severity":"error","filePath":"devtools/cli/src/main/java/io/quarkus/cli/create/TargetGAVGroup.java","lineNumber":62,"sourceCode":"                    // g:a:  -- (uncommon alternate)\n                    // g:a:v -- COMMON\n                    // :a:   -- (uncommon alternate)\n                    // :a:v  -- (uncommon)\n                    if (firstPos != 0) {\n                        groupId = gav.substring(0, firstPos);\n                    }\n                    if (lastPos == firstPos) {\n                        artifactId = gav.substring(firstPos + 1);\n                    } else if (lastPos >= firstPos + 2) {\n                        artifactId = gav.substring(firstPos + 1, lastPos);\n                    }\n                    if (lastPos > firstPos && lastPos <= gav.length() - 2) {\n                        version = gav.substring(lastPos + 1);\n                    }\n                }\n            }\n            if (artifactId != CreateProjectHelper.DEFAULT_ARTIFACT_ID && !OK_ID.matcher(artifactId).matches()) {\n                throw new TypeConversionException(String.format(BAD_IDENTIFIER, \"artifactId\", artifactId));\n            }\n            if (groupId != CreateProjectHelper.DEFAULT_GROUP_ID && !OK_ID.matcher(groupId).matches()) {\n                throw new TypeConversionException(String.format(BAD_IDENTIFIER, \"groupId\", groupId));\n            }\n\n            initialized = true;\n        }\n    }\n\n    public String getGroupId() {\n        projectGav();\n        return groupId;\n    }\n\n    public String getArtifactId() {\n        projectGav();\n        return artifactId;\n    }","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/cli/src/main/java/io/quarkus/cli/create/TargetGAVGroup.java#L44-L80","documentation":"Thrown by TargetGAVGroup.projectGav when a user-supplied --group-id / artifact coordinate fails the OK_ID regex (alphanumerics, underscores, dashes, dots). The CLI validates Maven identifiers early so project generation does not produce an unusable pom.xml. It is wrapped in a picocli TypeConversionException so picocli reports it as a parameter conversion failure.","triggerScenarios":"Running `quarkus create` with a --group-id (or GAV parsed from a single -Dvalue in projectGav) containing characters outside [A-Za-z0-9_.-], e.g. spaces, '@', ':', '~', or a leading symbol, while the value is not the placeholder default group id.","commonSituations":"Copy-pasting a group id from a document with a trailing space or smart quote; using an email-like or URL-like group id ('myorg/team'); shell-interpolated variables containing slashes; typos like 'com.acme!!'.","solutions":["Remove invalid characters from the --group-id value; use only A-Za-z0-9, '_', '-', '.'.","If the value came from a script variable, echo/printf it first to reveal hidden whitespace and quote it in the shell.","If you actually meant to pass a full GAV, use the group:artifact:version form so each part is validated separately."],"exampleFix":"// before\nquarkus create --group-id 'com/myco app'\n// after\nquarkus create --group-id com.myco.app","handlingStrategy":"validation","validationCode":"public static boolean isValidGroupId(String g) {\n    return g == null || g.matches(\"[A-Za-z0-9_.-]+\");\n}\n// call before: if (!isValidGroupId(groupId)) throw new IllegalArgumentException(groupId);","typeGuard":"public static boolean isSafeId(String s) {\n    return s != null && !s.isBlank() && s.chars().allMatch(c ->\n        Character.isLetterOrDigit(c) || c == '_' || c == '-' || c == '.');\n}","tryCatchPattern":null,"preventionTips":["Regex-check identifiers against [A-Za-z0-9_.-]+ before invoking the CLI.","Quote shell variables and strip whitespace: \"${VAR// /}\".","Prefer reverse-domain group ids like com.example.app.","Avoid building ids via string concatenation from user or file-system input."],"tags":["cli","validation","maven","project-creation"],"backgroundTag":"invalid-maven-identifier","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"}