diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 5561da50940..640a404eccd 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -300,6 +300,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 e8fdee54ae3..f6bbe0f5276 100644 --- a/hadoop-common-project/hadoop-common/pom.xml +++ b/hadoop-common-project/hadoop-common/pom.xml @@ -276,72 +276,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 - - - - + + @@ -417,6 +360,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