ppalaga commented on code in PR #5185: URL: https://github.com/apache/camel-quarkus/pull/5185#discussion_r1294367232
########## docs/modules/ROOT/pages/reference/extensions/grpc.adoc: ########## @@ -99,24 +76,49 @@ The `protobuf-maven-plugin` can generate service stubs for `.proto` files. Below </build> ---- -[id="extensions-grpc-usage-generated-code-limitations"] -==== Generated code limitations +With this configuration, you can put your service and message definitions into the `src/main/proto` directory and +the `quarkus-maven-plugin` will generate code from your `.proto` files. -A limitation of the generated code is that it is annotated with the non Jakarta EE 10 friendly `@javax.annotation.Generated`. +[id="extensions-grpc-usage-scanning-proto-files-with-imports"] +==== Scanning `proto` files with imports -To avoid compilation issues, the `grpc-java` project recommendation is to add a `provided` scoped dependency like this: +The Protocol Buffers specification provides a way to import proto files. You can control the scope of dependencies to +scan by adding configuration property `quarkus.camel.grpc.codegen.scan-for-imports property` to `application.properties`. Review Comment: ```suggestion scan by adding configuration property `quarkus.camel.grpc.codegen.scan-for-imports` property to `application.properties`. ``` ########## extensions/grpc/runtime/src/main/doc/usage.adoc: ########## @@ -1,45 +1,23 @@ === Protobuf generated code -You can https://github.com/grpc/grpc-java#generated-code[generate] gRPC service stubs with protobuf. - -==== protobuf-maven-plugin - -The `protobuf-maven-plugin` can generate service stubs for `.proto` files. Below is an example configuration for Maven. +Camel Quarkus gRPC can generate gRPC service stubs for `.proto` files. When using Maven, ensure that you have +enabled the `generate-code` goals of the `quarkus-maven-plugin` in your project build. [source,xml] ---- <build> - <extensions> - <extension> - <groupId>kr.motd.maven</groupId> - <artifactId>os-maven-plugin</artifactId> - <version>{os-maven-plugin-version}</version> - </extension> - </extensions> - <plugins> <plugin> - <groupId>org.xolstice.maven.plugins</groupId> - <artifactId>protobuf-maven-plugin</artifactId> - <version>{protobuf-maven-plugin-version}</version> - <configuration> - <protocArtifact>com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier}</protocArtifact> - <pluginId>grpc-java</pluginId> - <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact> - </configuration> Review Comment: Very nice to get rid of these uglyties -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org