|
255 | 255 | <exclude name="**/*.jsp" /> |
256 | 256 | </fileset> |
257 | 257 | </copy> |
258 | | - <unzip src="${lib.dir}/hadoop-mapred-${hadoop-mr.version}.jar" |
259 | | - dest="${build.dir}"> |
260 | | - <patternset> |
261 | | - <include name="webapps/**"/> |
262 | | - </patternset> |
263 | | - </unzip> |
| 258 | + <property name="hadoop-mapred.jar" |
| 259 | + location="${lib.dir}/hadoop-mapred-${hadoop-mr.version}.jar" /> |
| 260 | + <available property="hadoop-mapred.jar.exists" |
| 261 | + file="${hadoop-mapred.jar}" /> |
264 | 262 |
|
265 | 263 | <copy todir="${conf.dir}" verbose="true"> |
266 | 264 | <fileset dir="${conf.dir}" includes="**/*.template"/> |
|
274 | 272 |
|
275 | 273 | </target> |
276 | 274 |
|
277 | | - <target name="compile-hdfs-classes" depends="init"> |
| 275 | + <!-- unzip the web applications of mapred, if found--> |
| 276 | + <target name="unzip-mapred-webapps" depends="init" if="hadoop-mapred.jar.exists"> |
| 277 | + <unzip src="${hadoop-mapred.jar}" |
| 278 | + dest="${build.dir}"> |
| 279 | + <patternset> |
| 280 | + <include name="webapps/**"/> |
| 281 | + </patternset> |
| 282 | + </unzip> |
| 283 | + </target> |
| 284 | + |
| 285 | + <target name="ready-to-compile" depends="unzip-mapred-webapps, clover" /> |
| 286 | + |
| 287 | + <target name="compile-hdfs-classes" depends="ready-to-compile"> |
278 | 288 | <taskdef classname="org.apache.jasper.JspC" name="jsp-compile" > |
279 | 289 | <classpath refid="classpath"/> |
280 | 290 | </taskdef> |
|
494 | 504 | <copy file="${test.src.dir}/hdfs/org/apache/hadoop/hdfs/tools/offlineImageViewer/fsimageV19" todir="${test.cache.data}"/> |
495 | 505 | </target> |
496 | 506 |
|
497 | | - <target name="compile-hdfs-with-mr-test" depends="compile-hdfs-test"> |
| 507 | + <target name="compile-hdfs-with-mr-test" depends="compile-hdfs-test" |
| 508 | + if="hadoop-mapred.jar.exists"> |
498 | 509 | <mkdir dir="${test.hdfs.with.mr.build.classes}"/> |
499 | 510 | <javac |
500 | 511 | encoding="${build.encoding}" |
|
651 | 662 | <macro-test-runner test.file="${test.hdfs.commit.tests.file}" /> |
652 | 663 | </target> |
653 | 664 |
|
654 | | - <target name="run-test-hdfs-with-mr" depends="compile-hdfs-with-mr-test" description="Run hdfs unit tests that require mapred"> |
| 665 | + <target name="run-test-hdfs-with-mr" depends="compile-hdfs-with-mr-test" |
| 666 | + description="Run hdfs unit tests that require mapred" |
| 667 | + if="hadoop-mapred.jar.exists"> |
655 | 668 |
|
656 | 669 | <delete dir="${test.build.data}"/> |
657 | 670 | <mkdir dir="${test.build.data}"/> |
|
0 commit comments