{"record":{"id":"a3e3d808d80eeaab","repo":"quarkusio/quarkus","slug":"requested-artifact-appartifact-does-not-match-p","errorCode":null,"errorMessage":"Requested artifact ${appArtifact} does not match project ${group}:${name}:${version}","messagePattern":"Requested artifact (.+?) does not match project (.+?):(.+?):(.+?)","errorType":"exception","errorClass":"AppModelResolverException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/AppModelGradleResolver.java","lineNumber":176,"sourceCode":"    }\n\n    @Override\n    public ApplicationModel resolveManagedModel(ArtifactCoords appArtifact,\n            Collection<Dependency> directDeps,\n            Set<ArtifactKey> excludedArtifacts,\n            ArtifactCoords managingProject,\n            Set<ArtifactKey> localProjects)\n            throws AppModelResolverException {\n        return resolveModel(appArtifact);\n    }\n\n    protected void ensureProjectCoords(ArtifactCoords appArtifact) throws AppModelResolverException {\n        if (project.getName().equals(appArtifact.getArtifactId())\n                && project.getGroup().toString().equals(appArtifact.getGroupId())\n                && project.getVersion().toString().equals(appArtifact.getVersion())) {\n            return;\n        }\n        throw new AppModelResolverException(\n                \"Requested artifact \" + appArtifact + \" does not match project \" + project.getGroup() + \":\" + project.getName()\n                        + \":\" + project.getVersion());\n    }\n}\n","sourceCodeStart":158,"sourceCodeEnd":181,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/AppModelGradleResolver.java#L158-L181","documentation":"ensureProjectCoords validates that the requested ArtifactCoords match the current Gradle project's group/name/version. Thrown when resolveModel is asked for a model of an artifact that is not this project.","triggerScenarios":"Calling resolveModel with ArtifactCoords whose artifactId, groupId or version differ from project.getName(), project.getGroup() or project.getVersion().","commonSituations":"After a Gradle version bump (version property changed) while cached coordinates still reference the old version; group in build.gradle differs from the groupId baked into the calling code; requesting the model of another module.","solutions":["Align the requested ArtifactCoords with the project's current group:name:version (read them from the Project at call time)","Ensure build.gradle sets group/version consistently with what the tooling passes","If a different module's model is needed, use a resolver backed by the repository, not the project-based one"],"exampleFix":"// before\nresolver.resolveModel(ArtifactCoords.of(\"io.acme\",\"app\",\"\",\"jar\",\"1.0.0\"));\n// after\nArtifactCoords mine = ArtifactCoords.of(\n    project.getGroup().toString(), project.getName(), \"\", \"jar\", project.getVersion().toString());\nresolver.resolveModel(mine);","handlingStrategy":"validation","validationCode":"boolean matchesProject(Project p, ArtifactCoords c) {\n    return p.getName().equals(c.getArtifactId())\n        && p.getGroup().toString().equals(c.getGroupId())\n        && p.getVersion().toString().equals(c.getVersion());\n}","typeGuard":"boolean isProjectCoords(ArtifactCoords c, Project p) { return matchesProject(p, c); }","tryCatchPattern":"try { model = resolver.resolveModel(coords); } catch (AppModelResolverException e) { /* coords != project group:name:version — rebuild coords from Project */ }","preventionTips":["Always build ArtifactCoords from the live Project values, not cached constants","Keep build.gradle group/version in sync with tooling expectations","Use a repository-backed resolver for non-project artifacts"],"tags":["gradle","coordinates-mismatch","project-model"],"backgroundTag":"artifact-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-15T02:17:10.978Z"}