{"record":{"id":"f8482efb350dbe4d","repo":"quarkusio/quarkus","slug":"failed-to-find-quarkus-grpc-protoc-plugin-among-de","errorCode":null,"errorMessage":"Failed to find Quarkus gRPC protoc plugin among dependencies","messagePattern":"Failed to find Quarkus gRPC protoc plugin among dependencies","errorType":"exception","errorClass":"CodeGenException","httpStatus":null,"severity":"error","filePath":"extensions/grpc/codegen/src/main/java/io/quarkus/grpc/codegen/GrpcCodeGen.java","lineNumber":577,"sourceCode":"            case x86 -> \"x86_32\";\n            case arm -> \"arm_32\";\n            case aarch64 -> \"aarch_64\";\n            case mips -> \"mips_32\";\n            case mipsel -> \"mipsel_32\";\n            case mips64 -> \"mips_64\";\n            case mips64el -> \"mipsel_64\";\n            case ppc32 -> \"ppc_32\";\n            case ppc32le -> \"ppcle_32\";\n            case ppc -> \"ppc_64\";\n            case ppcle -> \"ppcle_64\";\n            default -> null;\n        };\n    }\n\n    private static Path prepareQuarkusGrpcExecutable(ApplicationModel appModel, Path buildDir) throws CodeGenException {\n        Path pluginPath = findArtifactPath(appModel, \"io.quarkus\", \"quarkus-grpc-protoc-plugin\", \"shaded\", \"jar\");\n        if (pluginPath == null) {\n            throw new CodeGenException(\"Failed to find Quarkus gRPC protoc plugin among dependencies\");\n        }\n\n        if (OS.current() != OS.WINDOWS) {\n            return writeScript(buildDir, pluginPath, \"#!/bin/sh\\n\", \".sh\");\n        } else {\n            return writeScript(buildDir, pluginPath, \"@echo off\\r\\n\", \".cmd\");\n        }\n    }\n\n    private static Path writeScript(Path buildDir, Path pluginPath, String shebang, String suffix) throws CodeGenException {\n        Path script;\n        try {\n            script = Files.createTempFile(buildDir, \"quarkus-grpc\", suffix);\n            try (BufferedWriter writer = Files.newBufferedWriter(script)) {\n                writer.write(shebang);\n                writePluginExeCmd(pluginPath, writer);\n            }\n        } catch (IOException e) {","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/grpc/codegen/src/main/java/io/quarkus/grpc/codegen/GrpcCodeGen.java#L559-L595","documentation":"Quarkus wraps the io.quarkus:quarkus-grpc-protoc-plugin:shaded:jar artifact into a shell/cmd wrapper script so protoc can invoke the Quarkus codegen plugin. prepareQuarkusGrpcExecutable throws this CodeGenException when findArtifactPath cannot locate that exact GAV with the 'shaded' classifier among the application's dependencies.","triggerScenarios":"Running gRPC code generation where the application model lacks io.quarkus:quarkus-grpc-protoc-plugin with classifier 'shaded' and type 'jar' — typically caused by dependency exclusions, a dependencyManagement override changing the classifier/version, or a custom platform BOM not importing it.","commonSituations":"Corporate dependency whitelists excluding quarkus artifacts; hand-rolled quarkus-bom versions missing the plugin; Gradle/Maven builds that filter quarkus deployment/runtime dependencies; using a very old or very new Quarkus version where plugin coordinates changed.","solutions":["Ensure the quarkus-grpc extension dependency (io.quarkus:quarkus-grpc) is present and not excluded, so the shaded protoc plugin is pulled in transitively","Check exclusions/dependencyManagement are not dropping the 'shaded' classifier artifact","Inspect resolved dependencies (mvn dependency:tree or gradle dependencies) for io.quarkus:quarkus-grpc-protoc-plugin:shaded","Align the Quarkus BOM version with the extension version (use the Quarkus platform BOM) so managed coordinates match"],"exampleFix":"// before\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-grpc</artifactId>\n  <exclusions>\n    <exclusion><groupId>io.quarkus</groupId><artifactId>quarkus-grpc-protoc-plugin</artifactId></exclusion>\n  </exclusions>\n</dependency>\n// after: remove the exclusion\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-grpc</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// verify the shaded plugin artifact resolves before building\n// mvn dependency:tree -Dincludes=io.quarkus:quarkus-grpc-protoc-plugin\nboolean present = resolvedDependencies.stream().anyMatch(d ->\n    \"io.quarkus\".equals(d.groupId) && \"quarkus-grpc-protoc-plugin\".equals(d.artifactId) && \"shaded\".equals(d.classifier));\nif (!present) throw new IllegalStateException(\"quarkus-grpc-protoc-plugin (shaded) missing from dependency graph\");","typeGuard":null,"tryCatchPattern":"try {\n    build.run();\n} catch (CodeGenException e) {\n    if (e.getMessage().contains(\"Failed to find Quarkus gRPC protoc plugin\")) {\n        throw new IllegalStateException(\"Add/keep io.quarkus:quarkus-grpc without exclusions so the shaded protoc plugin resolves\", e);\n    }\n}","preventionTips":["Never exclude io.quarkus:quarkus-grpc-protoc-plugin from the quarkus-grpc dependency","Keep dependencyManagement aligned with the Quarkus platform BOM","Check dependency:tree after upgrading Quarkus to confirm the shaded classifier still resolves","Ensure corporate repositories proxy/mirror the shaded classifier artifacts"],"tags":["grpc","codegen","dependencies","protoc-plugin"],"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-12T22:17:10.623Z"}