macOS grpc自动生成java代码问题

遇到了macOS grpc自动生成java代码问题

系统版本: macOS catalina 10.15
IDEA: 2019.1.3 社区版本

使用的protoc 的方式时,只能生成domain类,不能生成service类,需要使用protoc-gen-grpc-java的插件,各种需要自己编译,故使用https://github.com/grpc/grpc-java/blob/master/README.md描述的 Generated Code里面的方法。但是仍然无法生成grpc-java的代码,还是只有domain类,和使用widows系统同时比对,缺少如图1的标红的插件

image

继续看官方文档 发现如下描述(Eclipse and NetBeans users should also look at os-maven-plugin's IDE documentation进入链接https://github.com/trustin/os-maven-plugin#issues-with-eclipse-m2e-or-other-ides果断设置了maven的setting.xml。

另外注意需要执行两次 maven:protobuf:compile

如图
protobuf.compile.png
    
        
            os-properties
            
                osx
                x86_64
                osx-x86_64
            
        

  
    apus nexus
    os-properties
  

你可能感兴趣的:(macOS grpc自动生成java代码问题)