Hello,

Is there a way to compile *.proto containing grpc-gateway 
<https://github.com/grpc-ecosystem/grpc-gateway> definitions using maven? 
If so, what would that look like?

For regular gRPC services I do what the documentation says - compile using 
protobuf-maven-plugin with the grpc-java plugin. Much smoother than 
invoking ant or even running protoc from the command line. I would like to 
do the same for grpc-gateway.

<plugin>
    <groupId>org.xolstice.maven.plugins</groupId>
    <artifactId>protobuf-maven-plugin</artifactId>
    <version>0.5.0</version>
    <configuration>
        <!-- The version of protoc must match protobuf-java. 
                        If you don't depend on protobuf-java directly, you 
will be transitively depending 
                        on the protobuf-java version that grpc depends on. 
-->
        
<protocArtifact>com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}</protocArtifact>
        <pluginId>grpc-java</pluginId>
        
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${gRpcVersion}:exe:${os.detected.classifier}</pluginArtifact>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
                <goal>compile-custom</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Thank you,

David

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/c008b466-8b6d-4ce6-8f0f-985e972924f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to