Author: tucu Date: Thu Feb 14 01:36:47 2013 New Revision: 1446021 URL: http://svn.apache.org/r1446021 Log: HADOOP-9117. replace protoc ant plugin exec with a maven plugin. (tucu)
Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml?rev=1446021&r1=1446020&r2=1446021&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml (original) +++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml Thu Feb 14 01:36:47 2013 @@ -54,63 +54,30 @@ <build> <plugins> <plugin> - <artifactId>maven-antrun-plugin</artifactId> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-maven-plugins</artifactId> <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> - </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> + <id>compile-protoc</id> <phase>generate-sources</phase> <goals> - <goal>add-source</goal> + <goal>protoc</goal> </goals> <configuration> - <sources> - <source>target/generated-sources/proto</source> - </sources> + <imports> + <param>${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto</param> + <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> </execution> </executions>