-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
I would like to use the google.type.Decimal
and google.rpc.Status
message types within my message. Therefore, I have com.google.api.grpc:proto-google-common-protos:2.61.1
dependency in my project, as this dependency contains these grpc message definitions. In the gRPC code generation guide in the section "Proto files from dependencies" it says, that I need to put in the following line into my application.properties
file, so that Quarkus is able to pick up the dependency:
quarkus.generate-code.grpc.scan-for-imports=com.google.api.grpc:proto-google-common-protos
However, when I run ./mvnw quarkus:generate-code
, the compilation fails, because of missing type definition for the messages "Decimal" and "Status".
Expected behavior
The invocation of the gRPC protoc compiler finishes successfully.
Actual behavior
The invocation of the gRPC protoc compiler fails with the message:
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< dev.catalkaya:grpc-test >-----------------------
[INFO] Building grpc-test 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus:3.28.2:generate-code (default-cli) @ grpc-test ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.131 s
[INFO] Finished at: 2025-10-02T09:38:34+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.28.2:generate-code (default-cli) on project grpc-test: Quarkus code generation phase has failed: InvocationTargetException: Failed to generate Java classes from proto files: [/home/user/IdeaProjects/grpc-test/src/main/proto/my_message.proto] to /home/user/IdeaProjects/grpc-test/target/generated-sources/grpc with command /home/user/IdeaProjects/grpc-test/target/com.google.protobuf-protoc-linux-x86_64-exe -I=/home/user/IdeaProjects/grpc-test/src/main/proto -I=/home/user/IdeaProjects/grpc-test/target/protoc-dependencies/887869d68b3d4324376eb9ee6db4956483e8eaf8 --plugin=protoc-gen-grpc=/home/user/IdeaProjects/grpc-test/target/io.grpc-protoc-gen-grpc-java-linux-x86_64-exe --plugin=protoc-gen-q-grpc=/home/user/IdeaProjects/grpc-test/target/quarkus-grpc3713215682483653349.sh --q-grpc_out=/home/user/IdeaProjects/grpc-test/target/generated-sources/grpc --grpc_out=/home/user/IdeaProjects/grpc-test/target/generated-sources/grpc --java_out=/home/user/IdeaProjects/grpc-test/target/generated-sources/grpc /home/user/IdeaProjects/grpc-test/src/main/proto/my_message.proto: Process exited abnormally (pid 30270) with exit code 1 with error output:
[ERROR] > google/type/decimal.proto: File not found.
[ERROR] > my_message.proto:5:1: Import "google/type/decimal.proto" was not found or had errors.
[ERROR] > my_message.proto:12:3: "google.type.Decimal" is not defined.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
How to Reproduce?
I have created a dedicated GitHub repository to reproduce the error here: https://github.com/fatihcatalkaya/congenial-telegram
In the reproducer I have
- defined a message "MyMessage" which includes the "google.type.Decimal" type
- I have included the
com.google.api.grpc:proto-google-common-protos
in thepom.xml
- Added
quarkus.generate-code.grpc.scan-for-imports=com.google.api.grpc:proto-google-common-protos
to theapplication.properties
- Run
./mvnw quarkus:generate-code
expecting it to build successfully (but fails)
Output of uname -a
or ver
Linux MyDesktop 6.8.0-84-generic #84-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 5 22:36:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
openjdk version "21.0.8" 2025-07-15 OpenJDK Runtime Environment (build 21.0.8+9-Ubuntu-0ubuntu124.04.1) OpenJDK 64-Bit Server VM (build 21.0.8+9-Ubuntu-0ubuntu124.04.1, mixed mode, sharing)
Quarkus version or git rev
3.28.2
Build tool (ie. output of mvnw --version
or gradlew --version
)
Maven 3.9.11
Additional information
No response