{"record":{"id":"8a30e3f7f059359d","repo":"quarkusio/quarkus","slug":"appartifact-expression-appartifactcoords-does-n","errorCode":null,"errorMessage":"appArtifact expression ${appArtifactCoords} does not follow format groupId:artifactId:classifier:type:version","messagePattern":"appArtifact expression (.+?) does not follow format groupId:artifactId:classifier:type:version","errorType":"validation","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/QuarkusBootstrapProvider.java","lineNumber":534,"sourceCode":"                         * }\n                         */\n                        if (!projectFile.mkdirs()) {\n                            throw new MojoExecutionException(\"Failed to create the output dir \" + projectFile);\n                        }\n                    }\n                }\n                return ResolvedDependencyBuilder.newInstance()\n                        .setGroupId(projectArtifact.getGroupId())\n                        .setArtifactId(projectArtifact.getArtifactId())\n                        .setClassifier(projectArtifact.getClassifier())\n                        .setType(projectArtifact.getArtifactHandler().getExtension())\n                        .setVersion(projectArtifact.getVersion())\n                        .setResolvedPath(projectFile.toPath());\n            }\n\n            final String[] coordsArr = appArtifactCoords.split(\":\");\n            if (coordsArr.length < 2 || coordsArr.length > 5) {\n                throw new MojoExecutionException(\n                        \"appArtifact expression \" + appArtifactCoords\n                                + \" does not follow format groupId:artifactId:classifier:type:version\");\n            }\n            final String groupId = coordsArr[0];\n            final String artifactId = coordsArr[1];\n            String classifier = ArtifactCoords.DEFAULT_CLASSIFIER;\n            String type = ArtifactCoords.TYPE_JAR;\n            String version = null;\n            if (coordsArr.length == 3) {\n                version = coordsArr[2];\n            } else if (coordsArr.length > 3) {\n                classifier = coordsArr[2] == null ? ArtifactCoords.DEFAULT_CLASSIFIER : coordsArr[2];\n                type = coordsArr[3] == null ? ArtifactCoords.TYPE_JAR : coordsArr[3];\n                if (coordsArr.length > 4) {\n                    version = coordsArr[4];\n                }\n            }\n            if (version == null) {","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/QuarkusBootstrapProvider.java#L516-L552","documentation":"Quarkus Maven plugin builds the application artifact from a coordinate string passed via the appArtifact configuration. The string is split on ':' and must have between 2 and 5 parts (groupId:artifactId:classifier:type:version). This MojoExecutionException is thrown when the coordinate expression does not have the expected number of colon-separated parts.","triggerScenarios":"Calling the appArtifact method (via QuarkusBootstrapProvider.getApplicationArtifactBuilder) with an appArtifact string that splits into fewer than 2 or more than 5 tokens, e.g. 'com.acme:app:1.0:jar:extra:oops' or a single token 'myapp'.","commonSituations":"Typo in the appArtifact property in pom.xml or on the command line (-Dquarkus.appArtifact=...); pasting a coordinate with an unescaped extra colon; omitting both groupId and artifactId; using an artifact file path instead of Maven coordinates.","solutions":["Fix the appArtifact value to the format groupId:artifactId[:classifier][:type][:version], e.g. com.acme:my-app:1.0.0","Remove any extra ':'-separated segments so the string has 2 to 5 parts","If pointing at a local artifact, use a resolvable coordinate instead of a file path"],"exampleFix":"// before\n<appArtifact>com.acme:my-app::jar:1.0.0:extra</appArtifact>\n// after\n<appArtifact>com.acme:my-app::jar:1.0.0</appArtifact>","handlingStrategy":"validation","validationCode":"// validate the appArtifact coordinate before invoking the goal\nString[] parts = appArtifactCoords.split(\":\");\nif (parts.length < 2 || parts.length > 5) {\n    throw new IllegalArgumentException(\n        \"appArtifact must be groupId:artifactId[:classifier][:type][:version], got: \" + appArtifactCoords);\n}","typeGuard":"boolean isValidArtifactCoords(String coords) {\n    if (coords == null) return false;\n    int n = coords.split(\":\").length;\n    return n >= 2 && n <= 5;\n}","tryCatchPattern":"try {\n    mojo.appArtifact(coords);\n} catch (MojoExecutionException e) {\n    if (e.getMessage().contains(\"does not follow format\")) {\n        // fix coordinate format and retry\n    } else {\n        throw e;\n    }\n}","preventionTips":["Always specify at least groupId:artifactId in appArtifact coordinates","Prefer including the explicit version to avoid separate resolution failures","Count colon-separated segments before pasting coordinates into pom.xml or -D flags"],"tags":["maven","configuration","coordinate-format"],"backgroundTag":"maven-coordinate-format-invalid","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"}