From 0a2b40fad59267849a1f6286a38ae068d00595f1 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 9 Aug 2011 18:03:00 +0000 Subject: [PATCH] HADOOP-7528. Maven build fails in Windows. Contributed by Alejandro Abdelnur. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1155448 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-assemblies/pom.xml | 3 -- hadoop-common/CHANGES.txt | 3 ++ hadoop-common/pom.xml | 58 +++++++++++++++++++++++++++++---------- hadoop-project/pom.xml | 5 +--- pom.xml | 3 -- 5 files changed, 48 insertions(+), 24 deletions(-) diff --git a/hadoop-assemblies/pom.xml b/hadoop-assemblies/pom.xml index 59062a4b78..f6feb3a143 100644 --- a/hadoop-assemblies/pom.xml +++ b/hadoop-assemblies/pom.xml @@ -67,9 +67,6 @@ 1.6 - - unix - diff --git a/hadoop-common/CHANGES.txt b/hadoop-common/CHANGES.txt index 2b01d0dd71..61080c5aab 100644 --- a/hadoop-common/CHANGES.txt +++ b/hadoop-common/CHANGES.txt @@ -464,6 +464,9 @@ Trunk (unreleased changes) HADOOP-7523. Test org.apache.hadoop.fs.TestFilterFileSystem fails due to java.lang.NoSuchMethodException. (John Lee via tomwhite) + HADOOP-7528. Maven build fails in Windows. (Alejandro Abdelnur via + tomwhite) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-common/pom.xml b/hadoop-common/pom.xml index 582d6d721e..9a16c3261a 100644 --- a/hadoop-common/pom.xml +++ b/hadoop-common/pom.xml @@ -853,11 +853,17 @@ + which cygpath 2> /dev/null + if [ $? = 1 ]; then + BUILD_DIR="${project.build.directory}" + else + BUILD_DIR=`cygpath --unix '${project.build.directory}'` + fi TAR='tar cf -' UNTAR='tar xfBp -' - LIB_DIR="${project.build.directory}/native/target/usr/local/lib" + LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib" if [ -d $${LIB_DIR} ] ; then - TARGET_DIR="${project.build.directory}/${project.artifactId}-${project.version}/lib/native/${build.platform}" + TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native/${build.platform}" mkdir -p $${TARGET_DIR} cd $${LIB_DIR} $$TAR *hadoop* | (cd $${TARGET_DIR}/; $$UNTAR) @@ -881,11 +887,20 @@ - - - - - + + + + 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} + + + @@ -946,11 +961,17 @@ + which cygpath 2> /dev/null + if [ $? = 1 ]; then + BUILD_DIR="${project.build.directory}" + else + BUILD_DIR=`cygpath --unix '${project.build.directory}'` + fi TAR='tar cf -' UNTAR='tar xfBp -' - LIB_DIR="${project.build.directory}/native/target/usr/local/lib" + LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib" if [ -d $${LIB_DIR} ] ; then - TARGET_DIR="${project.build.directory}/${project.artifactId}-${project.version}-bin/lib" + TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}-bin/lib" mkdir -p $${TARGET_DIR} cd $${LIB_DIR} $$TAR *hadoop* | (cd $${TARGET_DIR}/; $$UNTAR) @@ -974,11 +995,20 @@ - - - - - + + + + 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}-bin.tar.gz ${project.artifactId}-${project.version}-bin + + + diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index 7ce3957cc7..3c8cb5c42a 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -462,9 +462,6 @@ 1.6 - - unix - @@ -507,7 +504,7 @@ os.linux - Linux + !Mac diff --git a/pom.xml b/pom.xml index 561cfe5126..004706d72d 100644 --- a/pom.xml +++ b/pom.xml @@ -79,9 +79,6 @@ 1.6 - - unix -