Skip to content

Instantly share code, notes, and snippets.

@Se7soz
Last active September 21, 2015 18:34
Show Gist options
  • Save Se7soz/f7ffbd3cb98300e59d02 to your computer and use it in GitHub Desktop.
Save Se7soz/f7ffbd3cb98300e59d02 to your computer and use it in GitHub Desktop.
Protocol Buffer Example
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>protocol.buffer</groupId>
<artifactId>sample</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>com.google.protobuf.tools</groupId>
<artifactId>maven-protoc-plugin</artifactId>
<version>0.4.2</version>
<configuration>
<protocExecutable>protoc</protocExecutable>
<protoSourceRoot>src/main/resources/</protoSourceRoot>
<outputDirectory>src/main/javagen/</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.6.1</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-sergei-ivanov-maven</id>
<name>bintray-plugins</name>
<url>http://dl.bintray.com/sergei-ivanov/maven</url>
</pluginRepository>
</pluginRepositories>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment