HADOOP-9117. replace protoc ant plugin exec with a maven plugin. (tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1446021 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ca12c99c79
commit
1709c222d9
|
@ -16,6 +16,8 @@ Release 2.0.4-beta - UNRELEASED
|
||||||
HADOOP-8924. Add maven plugin alternative to shell script to save
|
HADOOP-8924. Add maven plugin alternative to shell script to save
|
||||||
package-info.java. (Chris Nauroth via suresh)
|
package-info.java. (Chris Nauroth via suresh)
|
||||||
|
|
||||||
|
HADOOP-9117. replace protoc ant plugin exec with a maven plugin. (tucu)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -298,6 +298,10 @@
|
||||||
<!-- protobuf generated code -->
|
<!-- protobuf generated code -->
|
||||||
<Class name="~org\.apache\.hadoop\.security\.proto\.SecurityProtos.*"/>
|
<Class name="~org\.apache\.hadoop\.security\.proto\.SecurityProtos.*"/>
|
||||||
</Match>
|
</Match>
|
||||||
|
<Match>
|
||||||
|
<!-- protobuf generated code -->
|
||||||
|
<Class name="~org\.apache\.hadoop\.ipc\.protobuf\.TestProtos.*"/>
|
||||||
|
</Match>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Manually checked, misses child thread manually syncing on parent's intrinsic lock.
|
Manually checked, misses child thread manually syncing on parent's intrinsic lock.
|
||||||
|
|
|
@ -293,6 +293,51 @@
|
||||||
</source>
|
</source>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>compile-protoc</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>protoc</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<imports>
|
||||||
|
<param>${basedir}/src/main/proto</param>
|
||||||
|
</imports>
|
||||||
|
<source>
|
||||||
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
|
<includes>
|
||||||
|
<include>HAServiceProtocol.proto</include>
|
||||||
|
<include>IpcConnectionContext.proto</include>
|
||||||
|
<include>ProtocolInfo.proto</include>
|
||||||
|
<include>RpcPayloadHeader.proto</include>
|
||||||
|
<include>ZKFCProtocol.proto</include>
|
||||||
|
<include>hadoop_rpc.proto</include>
|
||||||
|
<include>Security.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>compile-test-protoc</id>
|
||||||
|
<phase>generate-test-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>protoc</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<imports>
|
||||||
|
<param>${basedir}/src/test/proto</param>
|
||||||
|
</imports>
|
||||||
|
<source>
|
||||||
|
<directory>${basedir}/src/test/proto</directory>
|
||||||
|
<includes>
|
||||||
|
<include>test.proto</include>
|
||||||
|
<include>test_rpc_service.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-test-sources/java</output>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -326,14 +371,13 @@
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>create-protobuf-generated-sources-directory</id>
|
<id>create-recordcc-generated-sources-directory</id>
|
||||||
<phase>initialize</phase>
|
<phase>initialize</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>run</goal>
|
<goal>run</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<mkdir dir="target/generated-sources/java" />
|
|
||||||
<mkdir dir="target/generated-test-sources/java" />
|
<mkdir dir="target/generated-test-sources/java" />
|
||||||
</target>
|
</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -394,67 +438,12 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>compile-proto</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<executable>protoc</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>-Isrc/main/proto/</argument>
|
|
||||||
<argument>--java_out=target/generated-sources/java</argument>
|
|
||||||
<argument>src/main/proto/HAServiceProtocol.proto</argument>
|
|
||||||
<argument>src/main/proto/IpcConnectionContext.proto</argument>
|
|
||||||
<argument>src/main/proto/ProtocolInfo.proto</argument>
|
|
||||||
<argument>src/main/proto/RpcPayloadHeader.proto</argument>
|
|
||||||
<argument>src/main/proto/ZKFCProtocol.proto</argument>
|
|
||||||
<argument>src/main/proto/hadoop_rpc.proto</argument>
|
|
||||||
<argument>src/main/proto/Security.proto</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>compile-test-proto</id>
|
|
||||||
<phase>generate-test-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<executable>protoc</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>-Isrc/test/proto/</argument>
|
|
||||||
<argument>--java_out=target/generated-test-sources/java</argument>
|
|
||||||
<argument>src/test/proto/test.proto</argument>
|
|
||||||
<argument>src/test/proto/test_rpc_service.proto</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>add-source</id>
|
<id>add-recordcc-test-source</id>
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>${project.build.directory}/generated-sources/java</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>add-test-source</id>
|
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>add-test-source</goal>
|
<goal>add-test-source</goal>
|
||||||
|
|
|
@ -204,7 +204,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compile>false</compile>
|
<compile>false</compile>
|
||||||
<workingDirectory>${project.build.directory}/generated-src/main/jsp</workingDirectory>
|
<workingDirectory>${project.build.directory}/generated-sources/java</workingDirectory>
|
||||||
<webFragmentFile>${project.build.directory}/hdfs-jsp-servlet-definitions.xml</webFragmentFile>
|
<webFragmentFile>${project.build.directory}/hdfs-jsp-servlet-definitions.xml</webFragmentFile>
|
||||||
<packageName>org.apache.hadoop.hdfs.server.namenode</packageName>
|
<packageName>org.apache.hadoop.hdfs.server.namenode</packageName>
|
||||||
<sources>
|
<sources>
|
||||||
|
@ -223,7 +223,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compile>false</compile>
|
<compile>false</compile>
|
||||||
<workingDirectory>${project.build.directory}/generated-src/main/jsp</workingDirectory>
|
<workingDirectory>${project.build.directory}/generated-sources/java</workingDirectory>
|
||||||
<webFragmentFile>${project.build.directory}/secondary-jsp-servlet-definitions.xml</webFragmentFile>
|
<webFragmentFile>${project.build.directory}/secondary-jsp-servlet-definitions.xml</webFragmentFile>
|
||||||
<packageName>org.apache.hadoop.hdfs.server.namenode</packageName>
|
<packageName>org.apache.hadoop.hdfs.server.namenode</packageName>
|
||||||
<sources>
|
<sources>
|
||||||
|
@ -242,7 +242,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compile>false</compile>
|
<compile>false</compile>
|
||||||
<workingDirectory>${project.build.directory}/generated-src/main/jsp</workingDirectory>
|
<workingDirectory>${project.build.directory}/generated-sources/java</workingDirectory>
|
||||||
<webFragmentFile>${project.build.directory}/journal-jsp-servlet-definitions.xml</webFragmentFile>
|
<webFragmentFile>${project.build.directory}/journal-jsp-servlet-definitions.xml</webFragmentFile>
|
||||||
<packageName>org.apache.hadoop.hdfs.server.journalservice</packageName>
|
<packageName>org.apache.hadoop.hdfs.server.journalservice</packageName>
|
||||||
<sources>
|
<sources>
|
||||||
|
@ -261,7 +261,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compile>false</compile>
|
<compile>false</compile>
|
||||||
<workingDirectory>${project.build.directory}/generated-src/main/jsp</workingDirectory>
|
<workingDirectory>${project.build.directory}/generated-sources/java</workingDirectory>
|
||||||
<webFragmentFile>${project.build.directory}/datanode-jsp-servlet-definitions.xml</webFragmentFile>
|
<webFragmentFile>${project.build.directory}/datanode-jsp-servlet-definitions.xml</webFragmentFile>
|
||||||
<packageName>org.apache.hadoop.hdfs.server.datanode</packageName>
|
<packageName>org.apache.hadoop.hdfs.server.datanode</packageName>
|
||||||
<sources>
|
<sources>
|
||||||
|
@ -296,7 +296,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>add-source</id>
|
<id>add-jsp-generated-sources-directory</id>
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>add-source</goal>
|
<goal>add-source</goal>
|
||||||
|
@ -304,7 +304,6 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>${project.build.directory}/generated-sources/java</source>
|
<source>${project.build.directory}/generated-sources/java</source>
|
||||||
<source>${project.build.directory}/generated-src/main/jsp</source>
|
|
||||||
</sources>
|
</sources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
@ -318,14 +317,14 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>create-protobuf-generated-sources-directory</id>
|
<id>create-jsp-generated-sources-directory</id>
|
||||||
<phase>initialize</phase>
|
<phase>initialize</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>run</goal>
|
<goal>run</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<mkdir dir="target/generated-sources/java" />
|
<mkdir dir="${project.build.directory}/generated-sources/java" />
|
||||||
</target>
|
</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
@ -403,80 +402,96 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>hadoop-maven-plugins</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>compile-proto</id>
|
<id>compile-protoc</id>
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>exec</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<executable>protoc</executable>
|
<imports>
|
||||||
<arguments>
|
<param>${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
<argument>-I../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
<param>${basedir}/src/main/proto</param>
|
||||||
<argument>-Isrc/main/proto/</argument>
|
</imports>
|
||||||
<argument>--java_out=target/generated-sources/java</argument>
|
<source>
|
||||||
<argument>src/main/proto/hdfs.proto</argument>
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
<argument>src/main/proto/GetUserMappingsProtocol.proto</argument>
|
<includes>
|
||||||
<argument>src/main/proto/HAZKInfo.proto</argument>
|
<include>GetUserMappingsProtocol.proto</include>
|
||||||
<argument>src/main/proto/InterDatanodeProtocol.proto</argument>
|
<include>HAZKInfo.proto</include>
|
||||||
<argument>src/main/proto/JournalProtocol.proto</argument>
|
<include>InterDatanodeProtocol.proto</include>
|
||||||
<argument>src/main/proto/RefreshAuthorizationPolicyProtocol.proto</argument>
|
<include>JournalProtocol.proto</include>
|
||||||
<argument>src/main/proto/RefreshUserMappingsProtocol.proto</argument>
|
<include>RefreshAuthorizationPolicyProtocol.proto</include>
|
||||||
<argument>src/main/proto/datatransfer.proto</argument>
|
<include>RefreshUserMappingsProtocol.proto</include>
|
||||||
</arguments>
|
<include>datatransfer.proto</include>
|
||||||
|
<include>hdfs.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>compile-proto-datanode</id>
|
<id>compile-protoc-datanode</id>
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>exec</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<executable>protoc</executable>
|
<imports>
|
||||||
<arguments>
|
<param>${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
<argument>-I../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
<param>${basedir}/src/main/proto</param>
|
||||||
<argument>-Isrc/main/proto/</argument>
|
</imports>
|
||||||
<argument>--java_out=target/generated-sources/java</argument>
|
<source>
|
||||||
<argument>src/main/proto/ClientDatanodeProtocol.proto</argument>
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
<argument>src/main/proto/DatanodeProtocol.proto</argument>
|
<includes>
|
||||||
</arguments>
|
<include>ClientDatanodeProtocol.proto</include>
|
||||||
|
<include>DatanodeProtocol.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>compile-proto-namenode</id>
|
<id>compile-protoc-namenode</id>
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>exec</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<executable>protoc</executable>
|
<imports>
|
||||||
<arguments>
|
<param>${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
<argument>-I../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
<param>${basedir}/src/main/proto</param>
|
||||||
<argument>-Isrc/main/proto/</argument>
|
</imports>
|
||||||
<argument>--java_out=target/generated-sources/java</argument>
|
<source>
|
||||||
<argument>src/main/proto/ClientNamenodeProtocol.proto</argument>
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
<argument>src/main/proto/NamenodeProtocol.proto</argument>
|
<includes>
|
||||||
</arguments>
|
<include>ClientNamenodeProtocol.proto</include>
|
||||||
|
<include>NamenodeProtocol.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>compile-proto-qjournal</id>
|
<id>compile-protoc-qjournal</id>
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>exec</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<executable>protoc</executable>
|
<imports>
|
||||||
<arguments>
|
<param>${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
<argument>-I../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
<param>${basedir}/src/main/proto</param>
|
||||||
<argument>-Isrc/main/proto/</argument>
|
</imports>
|
||||||
<argument>--java_out=target/generated-sources/java</argument>
|
<source>
|
||||||
<argument>src/main/proto/QJournalProtocol.proto</argument>
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
</arguments>
|
<includes>
|
||||||
|
<include>QJournalProtocol.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -92,63 +92,28 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
<artifactId>hadoop-maven-plugins</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>add-source</id>
|
<id>compile-protoc</id>
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>add-source</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<imports>
|
||||||
<source>${project.build.directory}/generated-sources/java</source>
|
<param>${basedir}/../../../../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
</sources>
|
<param>${basedir}/../../../../../hadoop-hdfs-project/hadoop-hdfs/src/main/proto</param>
|
||||||
</configuration>
|
<param>${basedir}/src/main/proto</param>
|
||||||
</execution>
|
</imports>
|
||||||
</executions>
|
<source>
|
||||||
</plugin>
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
<plugin>
|
<includes>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<include>bkjournal.proto</include>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
</includes>
|
||||||
<configuration>
|
</source>
|
||||||
<skipTests>false</skipTests>
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>create-protobuf-generated-sources-directory</id>
|
|
||||||
<phase>initialize</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<mkdir dir="target/generated-sources/java" />
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>compile-proto</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<executable>protoc</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>-I../../../../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
|
||||||
<argument>-Isrc/main/proto/</argument>
|
|
||||||
<argument>-I../../main/proto</argument>
|
|
||||||
<argument>--java_out=target/generated-sources/java</argument>
|
|
||||||
<argument>src/main/proto/bkjournal.proto</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -54,63 +54,30 @@
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
|
<artifactId>hadoop-maven-plugins</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>create-protobuf-generated-sources-directory</id>
|
<id>compile-protoc</id>
|
||||||
<phase>initialize</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<mkdir dir="target/generated-sources/proto" />
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>generate-sources</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<configuration>
|
|
||||||
<executable>protoc</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>-I../../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
|
||||||
<argument>-I../../../hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/</argument>
|
|
||||||
<argument>-Isrc/main/proto/</argument>
|
|
||||||
<argument>--java_out=target/generated-sources/proto</argument>
|
|
||||||
<argument>src/main/proto/mr_protos.proto</argument>
|
|
||||||
<argument>src/main/proto/mr_service_protos.proto</argument>
|
|
||||||
<argument>src/main/proto/MRClientProtocol.proto</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>add-source</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<imports>
|
||||||
<source>target/generated-sources/proto</source>
|
<param>${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
</sources>
|
<param>${basedir}/../../../hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto</param>
|
||||||
|
<param>${basedir}/src/main/proto</param>
|
||||||
|
</imports>
|
||||||
|
<source>
|
||||||
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
|
<includes>
|
||||||
|
<include>mr_protos.proto</include>
|
||||||
|
<include>mr_service_protos.proto</include>
|
||||||
|
<include>MRClientProtocol.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2012 The Apache Software Foundation.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.apache.hadoop.maven.plugin.protoc;
|
||||||
|
|
||||||
|
import org.apache.hadoop.maven.plugin.util.Exec;
|
||||||
|
import org.apache.hadoop.maven.plugin.util.FileSetUtils;
|
||||||
|
import org.apache.maven.model.FileSet;
|
||||||
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
|
import org.apache.maven.project.MavenProject;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Mojo(name="protoc", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
|
||||||
|
public class ProtocMojo extends AbstractMojo {
|
||||||
|
|
||||||
|
@Parameter(defaultValue="${project}")
|
||||||
|
private MavenProject project;
|
||||||
|
|
||||||
|
@Parameter
|
||||||
|
private List<File> imports;
|
||||||
|
|
||||||
|
@Parameter(defaultValue="${project.build.directory}/generated-sources/java")
|
||||||
|
private File output;
|
||||||
|
|
||||||
|
@Parameter(required=true)
|
||||||
|
private FileSet source;
|
||||||
|
|
||||||
|
@Parameter(defaultValue="protoc")
|
||||||
|
private String protocCommand;
|
||||||
|
|
||||||
|
|
||||||
|
public void execute() throws MojoExecutionException {
|
||||||
|
try {
|
||||||
|
if (!output.mkdirs()) {
|
||||||
|
if (!output.exists()) {
|
||||||
|
throw new MojoExecutionException("Could not create directory: " +
|
||||||
|
output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<String> command = new ArrayList<String>();
|
||||||
|
command.add(protocCommand);
|
||||||
|
command.add("--java_out=" + output.getCanonicalPath());
|
||||||
|
if (imports != null) {
|
||||||
|
for (File i : imports) {
|
||||||
|
command.add("-I" + i.getCanonicalPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (File f : FileSetUtils.convertFileSetToFiles(source)) {
|
||||||
|
command.add(f.getCanonicalPath());
|
||||||
|
}
|
||||||
|
Exec exec = new Exec(this);
|
||||||
|
List<String> out = new ArrayList<String>();
|
||||||
|
if (exec.run(command, out) != 0) {
|
||||||
|
getLog().error("protoc compiler error");
|
||||||
|
for (String s : out) {
|
||||||
|
getLog().error(s);
|
||||||
|
}
|
||||||
|
throw new MojoExecutionException("protoc failure");
|
||||||
|
}
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
throw new MojoExecutionException(ex.toString(), ex);
|
||||||
|
}
|
||||||
|
project.addCompileSourceRoot(output.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -35,66 +35,33 @@
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
|
<artifactId>hadoop-maven-plugins</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>create-protobuf-generated-sources-directory</id>
|
<id>compile-protoc</id>
|
||||||
<phase>initialize</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<mkdir dir="target/generated-sources/proto" />
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>generate-sources</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<configuration>
|
|
||||||
<executable>protoc</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>-I../../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
|
||||||
<argument>-Isrc/main/proto/</argument>
|
|
||||||
<argument>--java_out=target/generated-sources/proto</argument>
|
|
||||||
<argument>src/main/proto/yarn_protos.proto</argument>
|
|
||||||
<argument>src/main/proto/yarn_service_protos.proto</argument>
|
|
||||||
<argument>src/main/proto/AM_RM_protocol.proto</argument>
|
|
||||||
<argument>src/main/proto/client_RM_protocol.proto</argument>
|
|
||||||
<argument>src/main/proto/container_manager.proto</argument>
|
|
||||||
<argument>src/main/proto/yarn_server_resourcemanager_service_protos.proto</argument>
|
|
||||||
<argument>src/main/proto/RMAdminProtocol.proto</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>add-source</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<imports>
|
||||||
<source>target/generated-sources/proto</source>
|
<param>${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
</sources>
|
<param>${basedir}/src/main/proto</param>
|
||||||
|
</imports>
|
||||||
|
<source>
|
||||||
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
|
<includes>
|
||||||
|
<include>yarn_protos.proto</include>
|
||||||
|
<include>yarn_service_protos.proto</include>
|
||||||
|
<include>AM_RM_protocol.proto</include>
|
||||||
|
<include>client_RM_protocol.proto</include>
|
||||||
|
<include>container_manager.proto</include>
|
||||||
|
<include>yarn_server_resourcemanager_service_protos.proto</include>
|
||||||
|
<include>RMAdminProtocol.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -107,6 +107,27 @@
|
||||||
</source>
|
</source>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>compile-protoc</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>protoc</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<imports>
|
||||||
|
<param>${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
|
<param>${basedir}/../hadoop-yarn-api/src/main/proto</param>
|
||||||
|
<param>${basedir}/src/main/proto</param>
|
||||||
|
</imports>
|
||||||
|
<source>
|
||||||
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
|
<includes>
|
||||||
|
<include>yarnprototunnelrpc.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -124,18 +145,6 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
|
||||||
<id>create-protobuf-generated-sources-directory</id>
|
|
||||||
<phase>initialize</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<mkdir dir="target/generated-sources/proto" />
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
<execution>
|
||||||
<phase>pre-site</phase>
|
<phase>pre-site</phase>
|
||||||
<goals>
|
<goals>
|
||||||
|
@ -151,49 +160,6 @@
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>generate-sources</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<configuration>
|
|
||||||
<executable>protoc</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>-I../../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
|
||||||
<argument>-I../hadoop-yarn-api/src/main/proto/</argument>
|
|
||||||
<argument>-Isrc/main/proto/</argument>
|
|
||||||
<argument>--java_out=target/generated-sources/proto</argument>
|
|
||||||
<argument>src/main/proto/yarnprototunnelrpc.proto</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<source>target/generated-sources/proto</source>
|
|
||||||
<source>target/generated-sources/version</source>
|
|
||||||
</sources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -48,18 +48,6 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
|
||||||
<id>create-protobuf-generated-sources-directory</id>
|
|
||||||
<phase>initialize</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<mkdir dir="target/generated-sources/proto" />
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
<execution>
|
||||||
<phase>pre-site</phase>
|
<phase>pre-site</phase>
|
||||||
<goals>
|
<goals>
|
||||||
|
@ -75,45 +63,31 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>hadoop-maven-plugins</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>generate-sources</id>
|
<id>compile-protoc</id>
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<configuration>
|
|
||||||
<executable>protoc</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>-I../../../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
|
||||||
<argument>-I../../hadoop-yarn-api/src/main/proto/</argument>
|
|
||||||
<argument>-Isrc/main/proto/</argument>
|
|
||||||
<argument>--java_out=target/generated-sources/proto</argument>
|
|
||||||
<argument>src/main/proto/yarn_server_common_protos.proto</argument>
|
|
||||||
<argument>src/main/proto/yarn_server_common_service_protos.proto</argument>
|
|
||||||
<argument>src/main/proto/ResourceTracker.proto</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>add-source</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<imports>
|
||||||
<source>target/generated-sources/proto</source>
|
<param>${basedir}/../../../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
</sources>
|
<param>${basedir}/../../hadoop-yarn-api/src/main/proto</param>
|
||||||
|
<param>${basedir}/src/main/proto</param>
|
||||||
|
</imports>
|
||||||
|
<source>
|
||||||
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
|
<includes>
|
||||||
|
<include>yarn_server_common_protos.proto</include>
|
||||||
|
<include>yarn_server_common_service_protos.proto</include>
|
||||||
|
<include>yarn_server_common_service_protos.proto</include>
|
||||||
|
<include>ResourceTracker.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
@ -151,69 +151,29 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
|
<artifactId>hadoop-maven-plugins</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>create-protobuf-generated-sources-directory</id>
|
<id>compile-protoc</id>
|
||||||
<phase>initialize</phase>
|
|
||||||
<configuration>
|
|
||||||
<target>
|
|
||||||
<mkdir dir="target/generated-sources/proto" />
|
|
||||||
</target>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>run</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>compile</id>
|
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>run</goal>
|
<goal>protoc</goal>
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>generate-sources</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<configuration>
|
|
||||||
<executable>protoc</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>-I../../../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
|
|
||||||
<argument>-I../../hadoop-yarn-api/src/main/proto/</argument>
|
|
||||||
<argument>-Isrc/main/proto/</argument>
|
|
||||||
<argument>--java_out=target/generated-sources/proto</argument>
|
|
||||||
<argument>src/main/proto/yarn_server_nodemanager_service_protos.proto</argument>
|
|
||||||
<argument>src/main/proto/LocalizationProtocol.proto</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>add-source</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>add-source</goal>
|
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<imports>
|
||||||
<source>target/generated-sources/proto</source>
|
<param>${basedir}/../../../../hadoop-common-project/hadoop-common/src/main/proto</param>
|
||||||
</sources>
|
<param>${basedir}/../../hadoop-yarn-api/src/main/proto</param>
|
||||||
|
<param>${basedir}/src/main/proto</param>
|
||||||
|
</imports>
|
||||||
|
<source>
|
||||||
|
<directory>${basedir}/src/main/proto</directory>
|
||||||
|
<includes>
|
||||||
|
<include>yarn_server_nodemanager_service_protos.proto</include>
|
||||||
|
<include>LocalizationProtocol.proto</include>
|
||||||
|
</includes>
|
||||||
|
</source>
|
||||||
|
<output>${project.build.directory}/generated-sources/java</output>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
Loading…
Reference in New Issue