Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- <executions>
- <execution>
- <!--We need to overwrite the default-resources execution
- to run in the generate-sources phase otherwise the proto
- plugin runs and there are no files to compile.-->
- <id>default-resources</id>
- <goals>
- <goal>resources</goal>
- </goals>
- <phase>generate-sources</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.google.protobuf.tools</groupId>
- <artifactId>maven-protoc-plugin</artifactId>
- <version>0.3.2</version>
- <configuration>
- <!-- This protocExecutable is empty so each dev must have the protoc executable on their path.-->
- <protocExecutable></protocExecutable>
- <!-- This is the dir where the resources plugin drops the replaced .proto files.-->
- <protoSourceRoot>target/classes</protoSourceRoot>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>src/main/proto</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*.proto</include>
- </includes>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>2.5.0</version>
- </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>server</id>
- <properties>
- <proto.optimize_for>SPEED</proto.optimize_for>
- </properties>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
- <profile>
- <id>client</id>
- <properties>
- <proto.optimize_for>LITE_RUNTIME</proto.optimize_for>
- </properties>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement