{"record":{"id":"de306abf51017713","repo":"quarkusio/quarkus","slug":"unable-to-determine-groupid-and-artifactid-of-the-de306a","errorCode":null,"errorMessage":"Unable to determine groupId and artifactId of the extension that contains ${clazz.getName()} because the directory doesn't contain the necessary metadata","messagePattern":"Unable to determine groupId and artifactId of the extension that contains (.+?) because the directory doesn't contain the necessary metadata","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/util/ArtifactInfoUtil.java","lineNumber":105,"sourceCode":"                    }\n                    return ret;\n                }\n            } else if (\"file\".equals(codeLocation.getProtocol())) {\n                // E.g. /quarkus/extensions/arc/deployment/target/classes/io/quarkus/arc/deployment/devconsole\n                // This can happen if you run an example app in dev mode\n                // and this app is part of a multi-module project which also declares the extension\n                // Just try to locate the pom.properties file in the target/maven-archiver directory\n                // Note that this hack will not work if addMavenDescriptor=false or if the pomPropertiesFile is overridden\n                Path location = Paths.get(codeLocation.toURI());\n                while (!isTargetClasses(location) && location.getParent() != null) {\n                    location = location.getParent();\n                }\n                if (isTargetClasses(location)) {\n                    Path mavenArchiver = location.getParent().resolve(\"maven-archiver\");\n                    if (mavenArchiver.toFile().canRead()) {\n                        Entry<String, String> ret = groupIdAndArtifactId(mavenArchiver);\n                        if (ret == null) {\n                            throw new RuntimeException(\n                                    \"Unable to determine groupId and artifactId of the extension that contains \"\n                                            + clazz.getName()\n                                            + \" because the directory doesn't contain the necessary metadata\");\n                        }\n                        return ret;\n                    }\n                }\n                return new AbstractMap.SimpleEntry<>(\"unspecified\", \"unspecified\");\n            } else {\n                return new AbstractMap.SimpleEntry<>(\"unspecified\", \"unspecified\");\n            }\n        } catch (IOException | URISyntaxException e) {\n            throw new RuntimeException(\"Unable to determine groupId and artifactId of the jar that contains \" + clazz.getName(),\n                    e);\n        }\n    }\n\n    /**","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/util/ArtifactInfoUtil.java#L87-L123","documentation":"Variant of the groupId/artifactId resolution for classes located in a target/classes directory (typical during workspace builds). ArtifactInfoUtil looks in the sibling maven-archiver directory for pom metadata; when the directory contains none, this RuntimeException is thrown naming the extension and class.","triggerScenarios":"Resolving coordinates for a class loaded from an extension module's target/classes where the maven-archiver directory is missing or unreadable (mvn package not run, target partially cleaned, or build executed via an IDE that skips the archiver plugin).","commonSituations":"Quarkus development where extensions are built from source; running tests before 'mvn install' produced maven-archiver; cleaning target directories while a running process resolves coordinates; IDE-built classes directories.","solutions":["Run 'mvn install' (or at least package) for the extension so target/maven-archiver with archive metadata exists","Rebuild the affected extension module: ./mvnw install -f extensions/<name>/","Do a clean rebuild if target is stale/partial: mvn clean install -f extensions/<name>/","Guard the call with try-catch if coordinates are only informational"],"exampleFix":"// terminal, not code\n# before (fails)\n./mvnw test -f extensions/arc/runtime/\n# after\n./mvnw install -f extensions/arc/ && ./mvnw test -f extensions/arc/runtime/","handlingStrategy":"try-catch","validationCode":"boolean targetClassesHaveArchiver(Class<?> clazz) throws Exception {\n    var loc = clazz.getProtectionDomain().getCodeSource().getLocation();\n    if (loc == null) return false;\n    var p = java.nio.file.Paths.get(loc.toURI());\n    return p.endsWith(\"target/classes\") && p.getParent().resolve(\"maven-archiver\").toFile().canRead();\n}","typeGuard":null,"tryCatchPattern":"try {\n    var ga = ArtifactInfoUtil.groupIdAndArtifactId(clazz);\n    use(ga.getKey(), ga.getValue());\n} catch (RuntimeException e) {\n    log.warnf(\"Workspace build metadata missing for %s; run mvn install\", clazz.getName());\n    use(\"unspecified\", \"unspecified\");\n}","preventionTips":["Run ./mvnw install for extension modules before resolving their coordinates at build time","Do not clean target/ while a Quarkus build or test run is active","Use the Quarkus Maven tooling (not raw javac/IDE output) for workspace artifacts","Check target/maven-archiver exists when debugging workspace resolution"],"tags":["maven","workspace","artifact-coordinates"],"backgroundTag":"missing-artifact-metadata","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"}