From c4bfcf4478bc991b2e4ffed1eaa30084e0d8e34b Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Thu, 11 Oct 2012 22:25:38 +0000 Subject: [PATCH] HADOOP-8909. Merging change 1397338 from trunk git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1397339 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 + hadoop-common-project/hadoop-common/pom.xml | 107 ++++++++---------- 2 files changed, 49 insertions(+), 61 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 468fcf37852..827a58d37ee 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -38,6 +38,9 @@ Release 2.0.3-alpha - Unreleased HADOOP-8894. GenericTestUtils.waitFor should dump thread stacks on timeout (todd) + HADOOP-8909. Hadoop Common Maven protoc calls must not depend on external + sh script. (Chris Nauroth via suresh) + OPTIMIZATIONS HADOOP-8866. SampleQuantiles#query is O(N^2) instead of O(N). (Andrew Wang diff --git a/hadoop-common-project/hadoop-common/pom.xml b/hadoop-common-project/hadoop-common/pom.xml index afbf7c9eb89..1cf14df85e7 100644 --- a/hadoop-common-project/hadoop-common/pom.xml +++ b/hadoop-common-project/hadoop-common/pom.xml @@ -271,72 +271,15 @@ maven-antrun-plugin - compile-proto - generate-sources + create-protobuf-generated-sources-directory + initialize run - - PROTO_DIR=src/main/proto - JAVA_DIR=target/generated-sources/java - which cygpath 2> /dev/null - if [ $? = 1 ]; then - IS_WIN=false - else - IS_WIN=true - WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR` - WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR` - fi - mkdir -p $JAVA_DIR 2> /dev/null - for PROTO_FILE in `ls $PROTO_DIR/*.proto 2> /dev/null` - do - if [ "$IS_WIN" = "true" ]; then - protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE - else - protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE - fi - done - - - - - - - - - compile-test-proto - generate-test-sources - - run - - - - - PROTO_DIR=src/test/proto - JAVA_DIR=target/generated-test-sources/java - which cygpath 2> /dev/null - if [ $? = 1 ]; then - IS_WIN=false - else - IS_WIN=true - WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR` - WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR` - fi - mkdir -p $JAVA_DIR 2> /dev/null - for PROTO_FILE in `ls $PROTO_DIR/*.proto 2> /dev/null` - do - if [ "$IS_WIN" = "true" ]; then - protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE - else - protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE - fi - done - - - - + + @@ -412,6 +355,48 @@ + + org.codehaus.mojo + exec-maven-plugin + + + compile-proto + generate-sources + + exec + + + protoc + + -Isrc/main/proto/ + --java_out=target/generated-sources/java + src/main/proto/HAServiceProtocol.proto + src/main/proto/IpcConnectionContext.proto + src/main/proto/ProtocolInfo.proto + src/main/proto/RpcPayloadHeader.proto + src/main/proto/ZKFCProtocol.proto + src/main/proto/hadoop_rpc.proto + + + + + compile-test-proto + generate-test-sources + + exec + + + protoc + + -Isrc/test/proto/ + --java_out=target/generated-test-sources/java + src/test/proto/test.proto + src/test/proto/test_rpc_service.proto + + + + + org.codehaus.mojo build-helper-maven-plugin