Skip to content

Commit 60f0c4d

Browse files
author
Konstantin I Boudnik
committed
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
1 parent cc3138b commit 60f0c4d

File tree

5 files changed

+29
-32
lines changed

5 files changed

+29
-32
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,6 +2049,8 @@ Release 0.20.3 - Unreleased
20492049
comparators in initializers, which are no longer automatically run
20502050
in Java 6 when a class is referenced. (cutting via omalley)
20512051

2052+
HADOOP-7072. Remove java5 dependencies from build. (cos)
2053+
20522054
Release 0.20.2 - 2010-2-16
20532055

20542056
NEW FEATURES

build.xml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,6 @@
886886
To use, specify -Dforrest.home=<base of Apache Forrest installation> on the command line." if="forrest.home">
887887
<exec dir="${docs.src}" executable="${forrest.home}/bin/forrest"
888888
failonerror="true">
889-
<env key="JAVA_HOME" value="${java5.home}"/>
890889
</exec>
891890
<copy todir="${build.docs}">
892891
<fileset dir="${docs.src}/build/site/" />
@@ -903,7 +902,6 @@
903902
if="forrest.home">
904903
<exec dir="${src.docs.cn}" executable="${forrest.home}/bin/forrest" failonerror="true">
905904
<env key="LANG" value="en_US.utf8"/>
906-
<env key="JAVA_HOME" value="${java5.home}"/>
907905
</exec>
908906
<copy todir="${build.docs.cn}">
909907
<fileset dir="${src.docs.cn}/build/site/" />
@@ -913,16 +911,11 @@
913911
<antcall target="changes-to-html"/>
914912
</target>
915913

916-
<target name="forrest.check" unless="forrest.home" depends="java5.check">
914+
<target name="forrest.check" unless="forrest.home">
917915
<fail message="'forrest.home' is not defined. Please pass
918916
-Dforrest.home=&lt;base of Apache Forrest installation&gt; to Ant on the command-line." />
919917
</target>
920918

921-
<target name="java5.check" unless="java5.home">
922-
<fail message="'java5.home' is not defined. Forrest requires Java 5.
923-
Please pass -Djava5.home=&lt;base of Java 5 distribution&gt; to Ant on the command-line." />
924-
</target>
925-
926919
<target name="javadoc-dev" depends="compile, ivy-retrieve-javadoc" description="Generate javadoc for hadoop developers">
927920
<mkdir dir="${build.javadoc.dev}"/>
928921
<javadoc
@@ -1527,7 +1520,6 @@
15271520
<arg value="${findbugs.home}"/>
15281521
<arg value="${forrest.home}"/>
15291522
<arg value="${basedir}"/>
1530-
<arg value="${java5.home}"/>
15311523
</exec>
15321524
</target>
15331525

@@ -1549,7 +1541,6 @@
15491541
<arg value="${python.home}"/>
15501542
<arg value="${basedir}"/>
15511543
<arg value="${jira.passwd}"/>
1552-
<arg value="${java5.home}"/>
15531544
<arg value="${curl.cmd}"/>
15541545
<arg value="${defect}"/>
15551546
</exec>

src/docs/cn/forrest.properties

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,13 @@
7171
#forrest.validate=true
7272
#forrest.validate.xdocs=${forrest.validate}
7373
#forrest.validate.skinconf=${forrest.validate}
74-
#forrest.validate.sitemap=${forrest.validate}
75-
#forrest.validate.stylesheets=${forrest.validate}
74+
# Workaround (HADOOP-7072) for http://issues.apache.org/jira/browse/FOR-984
75+
# Remove when forrest-0.9 is available
76+
forrest.validate.sitemap=false
77+
forrest.validate.stylesheets=false
78+
forrest.validate.skins.stylesheets=false
79+
# End of forrest-0.8 + JDK6 workaround
7680
#forrest.validate.skins=${forrest.validate}
77-
#forrest.validate.skins.stylesheets=${forrest.validate.skins}
7881

7982
# *.failonerror=(true|false) - stop when an XML file is invalid
8083
#forrest.validate.failonerror=true

src/docs/forrest.properties

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,13 @@
7171
#forrest.validate=true
7272
#forrest.validate.xdocs=${forrest.validate}
7373
#forrest.validate.skinconf=${forrest.validate}
74-
#forrest.validate.sitemap=${forrest.validate}
75-
#forrest.validate.stylesheets=${forrest.validate}
74+
# Workaround (HADOOP-7072) for http://issues.apache.org/jira/browse/FOR-984
75+
# Remove when forrest-0.9 is available
76+
forrest.validate.sitemap=false
77+
forrest.validate.stylesheets=false
78+
# End of forrest-0.8 + JDK6 workaround
7679
#forrest.validate.skins=${forrest.validate}
77-
#forrest.validate.skins.stylesheets=${forrest.validate.skins}
80+
forrest.validate.skins.stylesheets=false
7881

7982
# *.failonerror=(true|false) - stop when an XML file is invalid
8083
#forrest.validate.failonerror=true

src/test/bin/test-patch.sh

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ parseArgs() {
2727
### Set HUDSON to true to indicate that this script is being run by Hudson
2828
HUDSON=true
2929
if [[ $# != 18 ]] ; then
30-
echo "ERROR: usage $0 HUDSON <PATCH_DIR> <SUPPORT_DIR> <PS_CMD> <WGET_CMD> <JIRACLI> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <ECLIPSE_HOME> <PYTHON_HOME> <WORKSPACE_BASEDIR> <JIRA_PASSWD> <JAVA5_HOME> <CURL_CMD> <DEFECT> "
30+
echo "ERROR: usage $0 HUDSON <PATCH_DIR> <SUPPORT_DIR> <PS_CMD> <WGET_CMD> <JIRACLI> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <ECLIPSE_HOME> <PYTHON_HOME> <WORKSPACE_BASEDIR> <JIRA_PASSWD> <CURL_CMD> <DEFECT> "
3131
cleanupAndExit 0
3232
fi
3333
PATCH_DIR=$2
@@ -44,7 +44,6 @@ parseArgs() {
4444
PYTHON_HOME=${13}
4545
BASEDIR=${14}
4646
JIRA_PASSWD=${15}
47-
JAVA5_HOME=${16}
4847
CURL=${17}
4948
defect=${18}
5049

@@ -65,7 +64,7 @@ parseArgs() {
6564
### Set HUDSON to false to indicate that this script is being run by a developer
6665
HUDSON=false
6766
if [[ $# != 10 ]] ; then
68-
echo "ERROR: usage $0 DEVELOPER <PATCH_FILE> <SCRATCH_DIR> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <WORKSPACE_BASEDIR> <JAVA5_HOME>"
67+
echo "ERROR: usage $0 DEVELOPER <PATCH_FILE> <SCRATCH_DIR> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <WORKSPACE_BASEDIR>"
6968
cleanupAndExit 0
7069
fi
7170
### PATCH_FILE contains the location of the patchfile
@@ -91,7 +90,6 @@ parseArgs() {
9190
FINDBUGS_HOME=$7
9291
FORREST_HOME=$8
9392
BASEDIR=$9
94-
JAVA5_HOME=${10}
9593
### Obtain the patch filename to append it to the version number
9694
defect=`basename $PATCH_FILE`
9795
;;
@@ -181,8 +179,8 @@ setup () {
181179
echo "======================================================================"
182180
echo ""
183181
echo ""
184-
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"
185-
$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
182+
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"
183+
$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
186184
if [[ $? != 0 ]] ; then
187185
echo "Trunk compilation is broken?"
188186
cleanupAndExit 1
@@ -329,8 +327,8 @@ checkJavacWarnings () {
329327
echo "======================================================================"
330328
echo ""
331329
echo ""
332-
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"
333-
$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
330+
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"
331+
$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
334332
if [[ $? != 0 ]] ; then
335333
JIRA_COMMENT="$JIRA_COMMENT
336334
@@ -369,8 +367,8 @@ checkReleaseAuditWarnings () {
369367
echo "======================================================================"
370368
echo ""
371369
echo ""
372-
echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= releaseaudit > $PATCH_DIR/patchReleaseAuditWarnings.txt 2>&1"
373-
$ANT_HOME/bin/ant -Dversion="${VERSION}" -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= releaseaudit > $PATCH_DIR/patchReleaseAuditWarnings.txt 2>&1
370+
echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= releaseaudit > $PATCH_DIR/patchReleaseAuditWarnings.txt 2>&1"
371+
$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= releaseaudit > $PATCH_DIR/patchReleaseAuditWarnings.txt 2>&1
374372

375373
### Compare trunk and patch release audit warning numbers
376374
if [[ -f $PATCH_DIR/patchReleaseAuditWarnings.txt ]] ; then
@@ -443,8 +441,8 @@ checkFindbugsWarnings () {
443441
echo "======================================================================"
444442
echo ""
445443
echo ""
446-
echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= findbugs"
447-
$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= findbugs
444+
echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= findbugs"
445+
$ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= findbugs
448446
if [ $? != 0 ] ; then
449447
JIRA_COMMENT="$JIRA_COMMENT
450448
@@ -498,8 +496,8 @@ runCoreTests () {
498496
PreTestTarget="create-c++-configure"
499497
fi
500498

501-
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"
502-
$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
499+
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"
500+
$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
503501
if [[ $? != 0 ]] ; then
504502
### Find and format names of failed tests
505503
failed_tests=`grep -l -E "<failure|<error" $WORKSPACE/trunk/build/test/*.xml | sed -e "s|.*build/test/TEST-| |g" | sed -e "s|\.xml||g"`
@@ -561,8 +559,8 @@ checkInjectSystemFaults () {
561559
### Kill any rogue build processes from the last attempt
562560
$PS auxwww | $GREP HadoopPatchProcess | /usr/bin/nawk '{print $2}' | /usr/bin/xargs -t -I {} /bin/kill -9 {} > /dev/null
563561

564-
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"
565-
$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
562+
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"
563+
$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
566564
if [[ $? != 0 ]] ; then
567565
JIRA_COMMENT="$JIRA_COMMENT
568566

0 commit comments

Comments
 (0)