Maven and java: how to generate code from protobuf files in test directory?
问题 My question is very similar to this question but for maven and java. I am testing grpc, and want to put to a simple helloworld.proto in the test/proto folder. However the file doesn't generate a java file (unlike the proto file in /src/main/proto). So my question is how to generate code for proto in the test folder? 回答1: First, follow the documentation to use the org.xolstice.maven.plugins protobuf-maven-plugin. Alternatively, you can copy the example pom.xml (this is pinned to the v1.19.0