gRPC-client-user-guide.md suggests cloning current master from both protobuf and grpc:
$ git clone https://github.com/google/protobuf.git
$ cd $HOME/protobuf
$ ./autogen.sh && ./configure && make -j8
$ git clone https://github.com/grpc/grpc-java.git
$ cd grpc-java/compiler
$ ../gradlew java_pluginExecutable
If doing testing, that can be fine, but it will be trivially broken when gRPC or proto is enhancing its generated code. You should generate at a tagged version that matches the runtime version (of the deps in pom.xml), or older.
For example, if the version of gRPC in the Maven file is 1.9.0, then you may only use generated code from tagged releases from 1.9.0 and earlier.