YARN-5961. Generate native services protobuf classes during build. Contributed by Billie Rinaldi

This commit is contained in:
Jian He 2016-12-03 13:27:04 -08:00
parent e4f0263e51
commit efe7d44ead
3 changed files with 27 additions and 36804 deletions

View File

@ -36,6 +36,33 @@
</resources>
<plugins>
<plugin>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-maven-plugins</artifactId>
<executions>
<execution>
<id>compile-protoc</id>
<goals>
<goal>protoc</goal>
</goals>
<configuration>
<protocVersion>${protobuf.version}</protocVersion>
<protocCommand>${protoc.path}</protocCommand>
<imports>
<param>${basedir}/src/main/proto</param>
</imports>
<source>
<directory>${basedir}/src/main/proto</directory>
<includes>
<include>SliderClusterMessages.proto</include>
<include>SliderClusterProtocol.proto</include>
</includes>
</source>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@ -85,9 +112,6 @@
<excludes>
<exclude>**/*.json</exclude>
<exclude>src/main/resources/webapps/slideram/.keep</exclude>
<!-- protobuf generated classes -->
<exclude>src/main/java/org/apache/slider/api/proto/Messages.java</exclude>
<exclude>src/main/java/org/apache/slider/api/proto/SliderClusterAPI.java</exclude>
</excludes>
</configuration>
</plugin>
@ -362,41 +386,6 @@
</plugins>
</build>
</profile>
<profile>
<id>compile-protobuf</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-maven-plugins</artifactId>
<executions>
<execution>
<id>compile-protoc</id>
<phase>generate-sources</phase>
<goals>
<goal>protoc</goal>
</goals>
<configuration>
<protocVersion>${protobuf.version}</protocVersion>
<protocCommand>protoc</protocCommand>
<imports>
<param>${basedir}/src/main/proto</param>
</imports>
<source>
<directory>${basedir}/src/main/proto</directory>
<includes>
<include>SliderClusterMessages.proto</include>
<include>SliderClusterProtocol.proto</include>
</includes>
</source>
<output>${basedir}/src/main/java</output>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>