diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 9509ad4ffd..3ac1555ecc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -373,7 +373,11 @@ Release 2.0.3-alpha - Unreleased HDFS-4008. TestBalancerWithEncryptedTransfer needs a timeout. (eli) HDFS-4007. Rehabilitate bit-rotted unit tests under - hadoop-hdfs-project/hadoop-hdfs/src/test/unit/ (Colin Patrick McCabe via todd) + hadoop-hdfs-project/hadoop-hdfs/src/test/unit/ + (Colin Patrick McCabe via todd) + + HDFS-4041. Hadoop HDFS Maven protoc calls must not depend on external + sh script. (Chris Nauroth via suresh) OPTIMIZATIONS diff --git a/hadoop-hdfs-project/hadoop-hdfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs/pom.xml index c5d45b1711..dc842ca283 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/pom.xml @@ -323,37 +323,14 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 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 - - - - + @@ -430,6 +407,81 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + org.codehaus.mojo + exec-maven-plugin + + + compile-proto + generate-sources + + exec + + + protoc + + -Isrc/main/proto/ + --java_out=target/generated-sources/java + src/main/proto/GetUserMappingsProtocol.proto + src/main/proto/HAZKInfo.proto + src/main/proto/InterDatanodeProtocol.proto + src/main/proto/JournalProtocol.proto + src/main/proto/RefreshAuthorizationPolicyProtocol.proto + src/main/proto/RefreshUserMappingsProtocol.proto + src/main/proto/datatransfer.proto + src/main/proto/hdfs.proto + + + + + compile-proto-datanode + generate-sources + + exec + + + protoc + + -Isrc/main/proto/ + --java_out=target/generated-sources/java + src/main/proto/ClientDatanodeProtocol.proto + src/main/proto/DatanodeProtocol.proto + + + + + compile-proto-namenode + generate-sources + + exec + + + protoc + + -Isrc/main/proto/ + --java_out=target/generated-sources/java + src/main/proto/ClientNamenodeProtocol.proto + src/main/proto/NamenodeProtocol.proto + + + + + compile-proto-qjournal + generate-sources + + exec + + + protoc + + -Isrc/main/proto/ + --java_out=target/generated-sources/java + src/main/proto/QJournalProtocol.proto + + + + + org.apache.maven.plugins maven-javadoc-plugin diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml index fa63e5eb37..3a37958ca6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml @@ -117,44 +117,41 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> - compile-proto - generate-sources + create-protobuf-generated-sources-directory + initialize run - - PROTO_DIR=src/main/proto - INCLUDE_DIR=../../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` - WIN_INCLUDE_DIR=`cygpath --windows $INCLUDE_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 -I$WIN_INCLUDE_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE - else - protoc -I$PROTO_DIR -I$INCLUDE_DIR --java_out=$JAVA_DIR $PROTO_FILE - fi - done - - - - + + + org.codehaus.mojo + exec-maven-plugin + + + compile-proto + generate-sources + + exec + + + protoc + + -Isrc/main/proto/ + -I../../main/proto + --java_out=target/generated-sources/java + src/main/proto/bkjournal.proto + + + + + org.codehaus.mojo findbugs-maven-plugin