Protocol buffers compiler maven plugin
This one comes with protoc built-in (it's originally based on igor-petruk/protobuf-maven-plugin, but it comes with protoc binaries bundled for Linux, Mac/OSX, and Windows). At runtime it detects the platform and executes the corresponding binary
https://github.com/os72/protoc-jar-maven-plugin
Here's an example:
<plugin>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<version>3.11.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<protocVersion>2.4.1</protocVersion>
<inputDirectories>
<include>src/main/protobuf</include>
</inputDirectories>
</configuration>
</execution>
</executions>
</plugin>
A good cross-platform solution is to use the protoc binary artifacts available in Maven Central.
The simple configuration changes needed to your pom.xml are described in the com.google.protobuf.tools: maven-protoc-plugin documentation "Resolving Protoc Artifact From Maven Central Repo"
In case the link disappears, the salient part is:
<project>
...
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.3.0.Final</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
<configuration>
<protocArtifact>com.google.protobuf:protoc:2.6.1:exe:${os.detected.classifier}</protocArtifact>
</configuration>
</execution>
</executions>
</plugin>
...
</plugins>
...
</build>
...
</project>