From e9544ef3d257d0f9f6a320b4b45ef81000ab9957 Mon Sep 17 00:00:00 2001 From: Alejandro Abdelnur Date: Thu, 13 Oct 2011 20:23:59 +0000 Subject: [PATCH] HADOOP-7737. normalize hadoop-mapreduce & hadoop-dist dist/tar build with common/hdfs (tucu) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1183068 13f79535-47bb-0310-9956-ffa450edef68 --- .../assemblies/hadoop-mapreduce-dist.xml | 4 +- .../hadoop-common/CHANGES.txt | 3 + hadoop-dist/pom.xml | 43 +++++++-- hadoop-mapreduce-project/pom.xml | 95 +++++++++++++------ 4 files changed, 107 insertions(+), 38 deletions(-) diff --git a/hadoop-assemblies/src/main/resources/assemblies/hadoop-mapreduce-dist.xml b/hadoop-assemblies/src/main/resources/assemblies/hadoop-mapreduce-dist.xml index f9c77b9939..bd17e4a908 100644 --- a/hadoop-assemblies/src/main/resources/assemblies/hadoop-mapreduce-dist.xml +++ b/hadoop-assemblies/src/main/resources/assemblies/hadoop-mapreduce-dist.xml @@ -3,9 +3,9 @@ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> hadoop-mapreduce-dist - tar.gz + dir - true + false diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 5ee67f968c..95d21a7d6c 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -42,6 +42,9 @@ Trunk (unreleased changes) if the override value is same as the final parameter value. (Ravi Prakash via suresh) + HADOOP-7737. normalize hadoop-mapreduce & hadoop-dist dist/tar build with + common/hdfs. (tucu) + BUGS HADOOP-7606. Upgrade Jackson to version 1.7.1 to match the version required diff --git a/hadoop-dist/pom.xml b/hadoop-dist/pom.xml index e804258826..3c4bfc46a6 100644 --- a/hadoop-dist/pom.xml +++ b/hadoop-dist/pom.xml @@ -85,13 +85,13 @@ dist - package + prepare-package run - - + + run() { echo "\$ ${@}" "${@}" @@ -110,9 +110,9 @@ run rm -rf hadoop-${project.version} run mkdir hadoop-${project.version} run cd hadoop-${project.version} - run tar xzf $ROOT/hadoop-common-project/hadoop-common/target/hadoop-common-${project.version}.tar.gz --strip-components 1 - run tar xzf $ROOT/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-${project.version}.tar.gz --strip-components 1 - run tar xzf $ROOT/hadoop-mapreduce-project/target/hadoop-mapreduce-${project.version}.tar.gz --strip-components 1 + run cp -r $ROOT/hadoop-common-project/hadoop-common/target/hadoop-common-${project.version}/* . + run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-${project.version}/* . + run cp -r $ROOT/hadoop-mapreduce-project/target/hadoop-mapreduce-${project.version}/* . COMMON_LIB=share/hadoop/common/lib MODULES=../../../../modules run ln -s $MODULES/hadoop-mapreduce-client-app-${project.version}.jar $COMMON_LIB @@ -122,7 +122,36 @@ run ln -s $MODULES/hadoop-mapreduce-client-core-${project.version}.jar $COMMON_LIB run ln -s $MODULES/hadoop-yarn-server-common-${project.version}.jar $COMMON_LIB run ln -s $MODULES/hadoop-mapreduce-client-jobclient-${project.version}.jar $COMMON_LIB - run cd - + echo + echo "Hadoop dist layout available at: ${project.build.directory}/hadoop-${project.version}" + echo + + + + + + + + + tar + package + + run + + + + + run() { + echo "\$ ${@}" + "${@}" + if [ $? != 0 ]; then + echo + echo "Failed!" + echo + exit $? + fi + } + run tar czf hadoop-${project.version}.tar.gz hadoop-${project.version} echo echo "Hadoop dist tar available at: ${project.build.directory}/hadoop-${project.version}.tar.gz" diff --git a/hadoop-mapreduce-project/pom.xml b/hadoop-mapreduce-project/pom.xml index 0d6c644933..cd2d013d52 100644 --- a/hadoop-mapreduce-project/pom.xml +++ b/hadoop-mapreduce-project/pom.xml @@ -302,6 +302,33 @@ run + + tar + package + + run + + + + + + + + which cygpath 2> /dev/null + if [ $? = 1 ]; then + BUILD_DIR="${project.build.directory}" + else + BUILD_DIR=`cygpath --unix '${project.build.directory}'` + fi + cd $BUILD_DIR + tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version} + + + + + + + @@ -320,35 +347,6 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - org.apache.hadoop - hadoop-assemblies - ${hadoop.assemblies.version} - - - - gnu - false - false - ${project.artifactId}-${project.version} - - hadoop-mapreduce-dist - - - - - tar - package - - single - - - - com.atlassian.maven.plugins maven-clover2-plugin @@ -401,6 +399,45 @@ + + + + dist + + false + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + org.apache.hadoop + hadoop-assemblies + ${project.version} + + + + gnu + false + false + ${project.artifactId}-${project.version} + + hadoop-mapreduce-dist + + + + + dist + prepare-package + + single + + + + +