I am following a tutorial about using grpc and I am supposed to use a plugin to generate source code but I am stuck on how to use the --grpc_out and --plugin flag.
Below are the current challenges.
If I dont use these plugin flags (--plugin,--grpc_out) my code is generated okay with this command
protoc -I /proto --java_out /hello/grpc/grpc/revamp/services /proto/messages.proto
This above works okay
Adding the flags, with the downloaded plugin from confusion 1 throws this error with this command;
protoc -I /proto --java_out /hello/grpc/grpc/revamp/services /proto/messages.proto --grpc_out /hello/grpc/grpc/revamp/services --plugin=protoc-gen-grpc=/proto/lib/protoc-gen-grpc-java-1.19.0-osx-x86_64.exe
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
Has anyone used this plugin on osx?, can anyone help see what I am doing wrong.
Thanks in advance
To resolve this, first I removed the .exe extension from the file downloaded from maven,
then allow the file to be executable by running the following command
chmod +x protoc-gen-grpc-java
After this the query worked okay. (Special thanks from the @author of the Course Michael Van Sickle)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With