From 17b01dcc5886709617de9f3f15fc3c5f3b953bbc Mon Sep 17 00:00:00 2001 From: Konstantin Boudnik Date: Tue, 4 Jan 2011 01:05:00 +0000 Subject: [PATCH] HADOOP-7072. Remove java5 dependencies from build. Contributed by Konstantin Boudnik. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1054848 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ build.xml | 11 +---------- src/docs/cn/forrest.properties | 9 ++++++--- src/docs/forrest.properties | 9 ++++++--- src/test/bin/test-patch.sh | 30 ++++++++++++++---------------- 5 files changed, 29 insertions(+), 32 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 710beb400e..aad098a21f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2049,6 +2049,8 @@ Release 0.20.3 - Unreleased comparators in initializers, which are no longer automatically run in Java 6 when a class is referenced. (cutting via omalley) + HADOOP-7072. Remove java5 dependencies from build. (cos) + Release 0.20.2 - 2010-2-16 NEW FEATURES diff --git a/build.xml b/build.xml index 5db108c637..1c3cddcfd2 100644 --- a/build.xml +++ b/build.xml @@ -886,7 +886,6 @@ To use, specify -Dforrest.home=<base of Apache Forrest installation> on the command line." if="forrest.home"> - @@ -903,7 +902,6 @@ if="forrest.home"> - @@ -913,16 +911,11 @@ - + - - - - - @@ -1549,7 +1541,6 @@ - diff --git a/src/docs/cn/forrest.properties b/src/docs/cn/forrest.properties index 0bfc7f8b4d..fa31a244c2 100644 --- a/src/docs/cn/forrest.properties +++ b/src/docs/cn/forrest.properties @@ -71,10 +71,13 @@ #forrest.validate=true #forrest.validate.xdocs=${forrest.validate} #forrest.validate.skinconf=${forrest.validate} -#forrest.validate.sitemap=${forrest.validate} -#forrest.validate.stylesheets=${forrest.validate} +# Workaround (HADOOP-7072) for http://issues.apache.org/jira/browse/FOR-984 +# Remove when forrest-0.9 is available +forrest.validate.sitemap=false +forrest.validate.stylesheets=false +forrest.validate.skins.stylesheets=false +# End of forrest-0.8 + JDK6 workaround #forrest.validate.skins=${forrest.validate} -#forrest.validate.skins.stylesheets=${forrest.validate.skins} # *.failonerror=(true|false) - stop when an XML file is invalid #forrest.validate.failonerror=true diff --git a/src/docs/forrest.properties b/src/docs/forrest.properties index 8f31f1fabb..14416af4ba 100644 --- a/src/docs/forrest.properties +++ b/src/docs/forrest.properties @@ -71,10 +71,13 @@ #forrest.validate=true #forrest.validate.xdocs=${forrest.validate} #forrest.validate.skinconf=${forrest.validate} -#forrest.validate.sitemap=${forrest.validate} -#forrest.validate.stylesheets=${forrest.validate} +# Workaround (HADOOP-7072) for http://issues.apache.org/jira/browse/FOR-984 +# Remove when forrest-0.9 is available +forrest.validate.sitemap=false +forrest.validate.stylesheets=false +# End of forrest-0.8 + JDK6 workaround #forrest.validate.skins=${forrest.validate} -#forrest.validate.skins.stylesheets=${forrest.validate.skins} +forrest.validate.skins.stylesheets=false # *.failonerror=(true|false) - stop when an XML file is invalid #forrest.validate.failonerror=true diff --git a/src/test/bin/test-patch.sh b/src/test/bin/test-patch.sh index 0a578079c1..e602774bce 100755 --- a/src/test/bin/test-patch.sh +++ b/src/test/bin/test-patch.sh @@ -27,7 +27,7 @@ parseArgs() { ### Set HUDSON to true to indicate that this script is being run by Hudson HUDSON=true if [[ $# != 18 ]] ; then - echo "ERROR: usage $0 HUDSON " + echo "ERROR: usage $0 HUDSON " cleanupAndExit 0 fi PATCH_DIR=$2 @@ -44,7 +44,6 @@ parseArgs() { PYTHON_HOME=${13} BASEDIR=${14} JIRA_PASSWD=${15} - JAVA5_HOME=${16} CURL=${17} defect=${18} @@ -65,7 +64,7 @@ parseArgs() { ### Set HUDSON to false to indicate that this script is being run by a developer HUDSON=false if [[ $# != 10 ]] ; then - echo "ERROR: usage $0 DEVELOPER " + echo "ERROR: usage $0 DEVELOPER " cleanupAndExit 0 fi ### PATCH_FILE contains the location of the patchfile @@ -91,7 +90,6 @@ parseArgs() { FINDBUGS_HOME=$7 FORREST_HOME=$8 BASEDIR=$9 - JAVA5_HOME=${10} ### Obtain the patch filename to append it to the version number defect=`basename $PATCH_FILE` ;; @@ -181,8 +179,8 @@ setup () { echo "======================================================================" echo "" echo "" - echo "$ANT_HOME/bin/ant -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -D${PROJECT_NAME}PatchProcess= clean tar > $PATCH_DIR/trunkJavacWarnings.txt 2>&1" - $ANT_HOME/bin/ant -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -D${PROJECT_NAME}PatchProcess= clean tar > $PATCH_DIR/trunkJavacWarnings.txt 2>&1 + echo "$ANT_HOME/bin/ant -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Dforrest.home=${FORREST_HOME} -D${PROJECT_NAME}PatchProcess= clean tar > $PATCH_DIR/trunkJavacWarnings.txt 2>&1" + $ANT_HOME/bin/ant -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Dforrest.home=${FORREST_HOME} -D${PROJECT_NAME}PatchProcess= clean tar > $PATCH_DIR/trunkJavacWarnings.txt 2>&1 if [[ $? != 0 ]] ; then echo "Trunk compilation is broken?" cleanupAndExit 1 @@ -329,8 +327,8 @@ checkJavacWarnings () { echo "======================================================================" echo "" echo "" - echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= clean tar > $PATCH_DIR/patchJavacWarnings.txt 2>&1" - $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= clean tar > $PATCH_DIR/patchJavacWarnings.txt 2>&1 + echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= clean tar > $PATCH_DIR/patchJavacWarnings.txt 2>&1" + $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= clean tar > $PATCH_DIR/patchJavacWarnings.txt 2>&1 if [[ $? != 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT @@ -369,8 +367,8 @@ checkReleaseAuditWarnings () { echo "======================================================================" echo "" echo "" - echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= releaseaudit > $PATCH_DIR/patchReleaseAuditWarnings.txt 2>&1" - $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= releaseaudit > $PATCH_DIR/patchReleaseAuditWarnings.txt 2>&1 + echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= releaseaudit > $PATCH_DIR/patchReleaseAuditWarnings.txt 2>&1" + $ANT_HOME/bin/ant -Dversion="${VERSION}" -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= releaseaudit > $PATCH_DIR/patchReleaseAuditWarnings.txt 2>&1 ### Compare trunk and patch release audit warning numbers if [[ -f $PATCH_DIR/patchReleaseAuditWarnings.txt ]] ; then @@ -443,8 +441,8 @@ checkFindbugsWarnings () { echo "======================================================================" echo "" echo "" - echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= findbugs" - $ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= findbugs + echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= findbugs" + $ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= findbugs if [ $? != 0 ] ; then JIRA_COMMENT="$JIRA_COMMENT @@ -498,8 +496,8 @@ runCoreTests () { PreTestTarget="create-c++-configure" fi - echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=no -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME $PreTestTarget test-core" - $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=no -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME $PreTestTarget test-core + echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=no -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME $PreTestTarget test-core" + $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=no -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME $PreTestTarget test-core if [[ $? != 0 ]] ; then ### Find and format names of failed tests failed_tests=`grep -l -E " /dev/null - echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=no -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME inject-system-faults" - $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=no -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME inject-system-faults + echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=no -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME inject-system-faults" + $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=no -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME inject-system-faults if [[ $? != 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT