Resolving Protoc Artifact From Maven Central Repo


Starting with versions 2.6.1 and 3.0.0-alpha-2 of protoc, its binary executables for all major operating systems are available as artifacts in Maven central. These artifacts can be referenced in plugin configuration as described below. The plugin automatically resolves and downloads the protoc executable, and uses it for compiling protobuf definitions.


It is recommended to use os-maven-plugin to automatically generate a classifier for the current OS and architecture. The same plugin is used by protobuf team at Google to generate classifiers for protoc artifacts.

Plugin parameter protocArtifact can be used for specifying artifact coordinates in a groupId:artifactId:version[:type[:classifier]] format.

A sample configuration is provided below:


Eclipse users, please also read the following notes.