【发布时间】:2019-04-05 03:48:06
【问题描述】:
跟进我的问题here,我注意到仍然没有创建一些文件。未创建的文件用于服务。消息被完美地创建。
重现我的问题的简单示例: 克隆例如this github repo。
rm -rf src/main/java (remove java files to avoid other compilation issues)
mv src/main/proto src/test/proto (move the proto file to test)
add the following goal to pom for plugin maven-protoc-plugin: <goal>test-compile</goal>
mvn clean package
它将正确创建这些 java 文件: 但缺少 GreeterGrpc (这是服务,是在 src/main/proto 中创建的):
所以我想知道如何在将 proto 文件移动到测试文件夹时创建服务的 java 文件。
【问题讨论】:
标签: java maven protocol-buffers grpc grpc-java