Integrate Protocol Buffers into Maven2 build

前端 未结 9 677
悲哀的现实
悲哀的现实 2021-01-30 02:18

I\'m experimenting with Protocol Buffers in an existing, fairly vanilla Maven 2 project. Currently, I invoke a shell script every time I need to update my generated sources. Thi

9条回答
  •  执笔经年
    2021-01-30 02:53

    There is a maven plugin for protobuf. https://www.xolstice.org/protobuf-maven-plugin/usage.html

    The minimal config

     
        org.xolstice.maven.plugins
        protobuf-maven-plugin
        0.5.0
        
          /usr/local/bin/protoc
        
        
          
            
              compile
              test-compile
            
          
        
      
    

提交回复
热议问题