Closed magick93 closed 5 years ago
The configuration looks OK to me. Can you provide a complete example as a gist?
Hi @sergei-ivanov
I am still working on getting a sample together.
In the meantime, perhaps you can help me understanding something. Why is <goal>compile-custom</goal>
used?
The documentation says:
protobuf:compile-custom
compiles main .proto definitions using a custom protoc plugin.
From my understanding this is used to call a custom protoc generator, eg, if a user wanted to make their own generator that parses, and generates, from proto files.
Also, what does "compile" actually mean in this situation? Would a more correct work be transpile?
compile-custom
goal allows to use custom plugins with protoc (protobuf compiler). gRPC plugin is one of them. Basically, they are standalone executable files that are invoked by protoc
and passed protobuf metadata that allows them to generate any custom output from proto files. For example, they may support generating protobuf bindings for exotic programming languages or generating alternative implementations. The prefix compile is historic and relates to protoc
, which stands for protobuf compiler
.
I had the same issue, you need to use
<clearOutputDirectory>false</clearOutputDirectory>
as the default value is true
which means before every goal execution, the generated source directory is cleaned. This is not an expected behavior in the case gRPC plugin.
Hello When I generate, using the following, I am not getting any service stubs generated. I only get OuterClasses.
Any idea what I am doing wrong?