-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathbuild.xml
636 lines (545 loc) · 24 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
<?xml version="1.0"?>
<!--
Licensed to Cloudera, Inc. under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
Cloudera, Inc. licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="sqoop" default="jar"
xmlns:artifact="urn:maven-artifact-ant"
xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- some basic properties -->
<property environment="env"/>
<property name="name" value="sqoop" />
<property name="Name" value="Sqoop" />
<property name="version" value="0.1-SNAPSHOT" />
<property name="artifact.name" value="${name}-${version}" />
<property name="dest.jar" value="${artifact.name}.jar"/>
<!-- locations in the source tree -->
<property name="src.dir" location="${basedir}/src/java" />
<property name="test.dir" location="${basedir}/src/test" />
<property name="shim.src.dir" location="${basedir}/src/shims" />
<property name="lib.dir" location="${basedir}/lib" />
<property name="docs.src.dir" location="${basedir}/src/docs" />
<property name="build.dir" location="${basedir}/build" />
<property name="build.classes" location="${build.dir}/classes"/>
<property name="build.shim.dir" location="${build.dir}/shims"/>
<property name="build.shim.classes" location="${build.shim.dir}/classes"/>
<property name="build.test" location="${build.dir}/test"/>
<property name="build.test.classes" location="${build.test}/classes" />
<property name="build.javadoc" location="${build.dir}/docs/api" />
<property name="test.log.dir" location="${build.dir}/test/logs"/>
<property name="dist.dir" location="${build.dir}/${artifact.name}" />
<property name="tar.file" location="${build.dir}/${artifact.name}.tar.gz" />
<!-- compilation -->
<property name="javac.deprecation" value="off"/>
<property name="javac.debug" value="on"/>
<property name="build.encoding" value="ISO-8859-1"/>
<!-- controlling the Hadoop source -->
<!-- valid values for ${hadoop.dist} are 'apache' and 'cloudera' -->
<property name="hadoop.dist" value="apache" />
<!-- testing with JUnit -->
<property name="test.junit.output.format" value="plain"/>
<property name="test.output" value="no"/>
<property name="test.timeout" value="300000"/>
<!-- static analysis -->
<property name="findbugs.out.dir" value="${build.dir}/findbugs" />
<property name="findbugs.output.xml.file"
value="${findbugs.out.dir}/report.xml" />
<property name="findbugs.output.html.file"
value="${findbugs.out.dir}/report.html" />
<property name="findbugs.excludes"
location="${test.dir}/findbugsExcludeFile.xml" />
<!-- code coverage -->
<property name="cobertura.dir" value="${build.dir}/cobertura" />
<property name="cobertura.home" value="${cobertura.dir}" />
<property name="cobertura.report.dir" value="${cobertura.dir}/report" />
<property name="cobertura.format" value="html" /> <!-- may be 'xml' -->
<property name="cobertura.class.dir" value="${cobertura.dir}/classes" />
<!-- When testing with non-free JDBC drivers, override this parameter
to contain the path to the driver library dir.
-->
<property name="sqoop.thirdparty.lib.dir" value="" />
<!-- Ivy-based dependency resolution -->
<property name="ivy.dir" location="${basedir}/ivy" />
<property name="ivysettings.xml" location="${ivy.dir}/ivysettings.xml"/>
<loadproperties srcfile="${ivy.dir}/libraries.properties"/>
<property name="ivy.jar" location="${lib.dir}/ivy-${ivy.version}.jar"/>
<property name="ivy_repo_url"
value="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" />
<property name="build.ivy.dir" location="${build.dir}/ivy" />
<property name="build.ivy.lib.dir" location="${build.ivy.dir}/lib" />
<property name="build.ivy.report.dir" location="${build.ivy.dir}/report" />
<property name="redist.ivy.lib.dir"
location="${build.ivy.lib.dir}/${name}/redist"/>
<!--this is the naming policy for artifacts we want pulled down-->
<property name="ivy.artifact.retrieve.pattern"
value="${name}/[conf]/[artifact]-[revision].[ext]"/>
<!-- Path containing third-party libraries deployed directly with Sqoop.
This does not include anything that Ivy can retrieve for us.
-->
<path id="lib.path">
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="${hadoop.dist}/*.jar" />
</fileset>
</path>
<!-- The classpath for compiling and running Sqoop -->
<path id="compile.classpath">
<pathelement location="${build.classes}"/>
<path refid="lib.path"/>
<path refid="${name}.common.classpath"/>
<path refid="${name}.hadoop.classpath"/>
</path>
<!-- Classpath for unit tests (superset of compile.classpath) -->
<path id="test.classpath">
<pathelement location="${build.test.classes}" />
<path refid="${name}.hadooptest.classpath"/>
<path refid="${name}.test.classpath"/>
<path refid="compile.classpath"/>
</path>
<path id="cobertura.classpath">
<fileset dir="${cobertura.home}">
<include name="**/*.jar" />
</fileset>
</path>
<!-- "init" target reserved for future setup purposes. -->
<target name="init" />
<!-- Compile a shim class so Sqoop can run with the specified hadoop.dist -->
<target name="compile-one-shim"
depends="init, ivy-retrieve-common, ivy-retrieve-hadoop">
<mkdir dir="${build.shim.classes}/${hadoop.dist}" />
<javac
encoding="${build.encoding}"
destdir="${build.shim.classes}/${hadoop.dist}"
debug="${javac.debug}"
deprecation="${javac.deprecation}">
<classpath refid="compile.classpath"/>
<src path="${shim.src.dir}/${hadoop.dist}" />
<src path="${shim.src.dir}/common" />
<include name="**/*.java" />
</javac>
</target>
<!-- Compile one shim and fetch it into a jar file. -->
<target name="jar-one-shim" depends="init,compile-one-shim">
<jar jarfile="${build.shim.dir}/${name}-${version}-shim-${hadoop.dist}.jar"
basedir="${build.shim.classes}/${hadoop.dist}" />
</target>
<!-- Create jars for all shims -->
<target name="jar-all-shims" depends="init,compile">
<antcall target="jar-one-shim" inheritAll="false">
<param name="hadoop.dist" value="apache" />
</antcall>
<antcall target="jar-one-shim" inheritAll="false">
<param name="hadoop.dist" value="cloudera" />
</antcall>
</target>
<!-- Compile core classes for the project -->
<target name="compile"
depends="init, ivy-retrieve-common, ivy-retrieve-hadoop"
description="Compile core classes for the project">
<!-- don't use an out-of-date instrumented build. -->
<delete dir="${cobertura.class.dir}" />
<!-- ensure normal build target dir exists -->
<mkdir dir="${build.classes}" />
<javac
encoding="${build.encoding}"
srcdir="${src.dir}"
includes="**/*.java"
destdir="${build.classes}"
debug="${javac.debug}"
deprecation="${javac.deprecation}">
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="compile-test"
depends="compile, ivy-retrieve-test, ivy-retrieve-hadoop-test"
description="Compile test classes">
<mkdir dir="${build.test.classes}" />
<javac
encoding="${build.encoding}"
srcdir="${test.dir}"
includes="**/*.java"
destdir="${build.test.classes}"
debug="${javac.debug}">
<classpath>
<path refid="test.classpath"/>
</classpath>
</javac>
</target>
<target name="jar" depends="compile" description="Create main jar">
<jar jarfile="${build.dir}/${dest.jar}" basedir="${build.classes}" />
</target>
<!-- Ensure that all source code can be built -->
<target name="compile-all" depends="compile,compile-test,jar-all-shims"
description="Compile all sources"/>
<target name="package" depends="jar,compile-all,docs,javadoc,ivy-retrieve-redist"
description="Create a redistributable package">
<mkdir dir="${dist.dir}"/>
<!-- copy in the build artifact -->
<copy todir="${dist.dir}" includeEmptyDirs="false" flatten="true">
<fileset dir="${build.dir}">
<include name="${dest.jar}" />
</fileset>
</copy>
<!-- copy in all shim artifacts -->
<mkdir dir="${dist.dir}/shims" />
<copy todir="${dist.dir}/shims" includeEmptyDirs="false" flatten="true">
<fileset dir="${build.shim.dir}">
<include name="*.jar" />
</fileset>
</copy>
<!-- copy in various components of the initial source layout
so that the redistributable can bootstrap itself. -->
<copy todir="${dist.dir}" includeEmptyDirs="false" flatten="false">
<fileset dir="${basedir}">
<include name="**/*" />
<exclude name="build/**" />
<exclude name="lib/**" />
<exclude name=".git/**" />
<exclude name="tags" />
<exclude name=".project" />
<exclude name=".classpath" />
</fileset>
</copy>
<!-- copy the dependency libraries from ivy into the output lib dir -->
<mkdir dir="${dist.dir}/lib"/>
<copy todir="${dist.dir}/lib" includeEmptyDirs="false" flatten="true">
<fileset dir="${redist.ivy.lib.dir}">
<include name="**/*.jar" />
</fileset>
</copy>
<copy todir="${dist.dir}/lib" includeEmptyDirs="false">
<fileset dir="${lib.dir}">
<include name="**/*" />
<exclude name="ivy*" />
</fileset>
</copy>
<!-- copy in documentation build artifacts -->
<copy todir="${dist.dir}/docs" includeEmptyDirs="false" flatten="false">
<fileset dir="${build.dir}/docs">
<include name="**/*" />
</fileset>
</copy>
<chmod perm="ugo+x" type="file" parallel="false">
<fileset dir="${dist.dir}/bin" />
</chmod>
</target>
<target name="tar" depends="package" description="Create release tarball">
<tar compression="gzip" longfile="gnu" destfile="${tar.file}">
<tarfileset dir="${build.dir}" mode="664">
<exclude name="${artifact.name}/bin/*" />
<include name="${artifact.name}/**" />
</tarfileset>
<tarfileset dir="${build.dir}" mode="755">
<include name="${artifact.name}/bin/*" />
</tarfileset>
</tar>
</target>
<!-- set variables that configure the actual test -->
<target name="test-prep" depends="test-prep-normal,test-prep-thirdparty"/>
<target name="test-prep-normal" unless="thirdparty">
<!-- Set this to run all the "standard" tests -->
<property name="test.pattern" value="Test*" />
<property name="cobertura.testset" value="base" />
</target>
<target name="test-prep-thirdparty" if="thirdparty">
<!-- Run tests that *end* with the name Test, instead of starting with it;
this runs non-standard tests e.g. third-party database tests. -->
<property name="test.pattern" value="*Test" />
<property name="cobertura.testset" value="thirdparty" />
</target>
<!-- ================================================================== -->
<!-- Run unit tests -->
<!-- By default, we'll run the "normal" tests: Test*.java -->
<!-- To run third-party tests, run with -Dthirdparty=true -->
<!-- ================================================================== -->
<target name="test"
depends="compile-test,compile,jar-one-shim,test-prep,run-tests"
description="Run unit tests" />
<!-- actually run the selected unit tests -->
<target name="run-tests"
depends="compile-test,compile,jar-one-shim,test-prep">
<antcall target="checkfailure" inheritRefs="true" />
</target>
<target name="test-core">
<!-- inner target only intended to be used via antcall.
Does not define its dependencies. Should be invoked through the
'test' target. Does not fail the build if tests fail.
-->
<delete dir="${test.log.dir}"/>
<mkdir dir="${test.log.dir}"/>
<delete dir="${build.test}/data"/>
<mkdir dir="${build.test}/data" />
<mkdir dir="${cobertura.class.dir}" />
<junit
printsummary="yes" showoutput="${test.output}"
haltonfailure="no" fork="yes" maxmemory="256m"
errorProperty="tests.failed" failureProperty="tests.failed"
timeout="${test.timeout}"
dir="${build.test}/data">
<!-- enable asserts in tests -->
<jvmarg value="-ea" />
<!-- uncomment this if you want to attach a debugger -->
<!--
<jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=2601" />
-->
<sysproperty key="test.build.data" value="${build.test}/data"/>
<sysproperty key="build.test" value="${build.test}"/>
<sysproperty key="sqoop.shim.jar.dir" value="${build.shim.dir}" />
<sysproperty key="net.sourceforge.cobertura.datafile"
value="${cobertura.dir}/cobertura-${cobertura.testset}.ser" />
<!-- define this property to force Sqoop to throw better exceptions on
errors during testing, instead of printing a short message and
exiting with status 1.
-->
<sysproperty key="sqoop.throwOnError" value="" />
<!-- we want more log4j output when running unit tests -->
<sysproperty key="hadoop.root.logger"
value="DEBUG,console" />
<!-- requires fork=yes for:
relative File paths to use the specified user.dir
classpath to use build/*.jar
-->
<sysproperty key="user.dir" value="${build.test}/data"/>
<!-- Setting the user.dir property is actually meaningless as it
is read-only in the Linux Sun JDK. Provide an alternate sysprop
to specify where generated code should go.
-->
<sysproperty key="sqoop.src.dir" value="${build.test}/data"/>
<!-- Override standalone Hadoop's working dirs to allow parallel
execution of multiple Hudson builders
-->
<sysproperty key="hadoop.tmp.dir" value="${build.test}/hadoop"/>
<sysproperty key="fs.default.name" value="${fs.default.name}"/>
<sysproperty key="hadoop.test.localoutputfile"
value="${hadoop.test.localoutputfile}"/>
<sysproperty key="hadoop.log.dir" value="${test.log.dir}"/>
<!-- we have a mock "hive" shell instance in our testdata directory
for testing hive integration. Set this property here to ensure
that the unit tests pick it up.
-->
<sysproperty key="hive.home" value="${basedir}/testdata/hive" />
<classpath>
<!-- instrumented classes go ahead of normal classes -->
<pathelement location="${cobertura.class.dir}" />
<!-- main classpath here. -->
<path refid="test.classpath" />
<!-- need thirdparty JDBC drivers for thirdparty tests -->
<fileset dir="${sqoop.thirdparty.lib.dir}"
includes="*.jar" />
<!-- include cobertura itself on the classpath -->
<path refid="cobertura.classpath" />
</classpath>
<formatter type="${test.junit.output.format}" />
<batchtest todir="${build.test}" unless="testcase">
<fileset dir="${test.dir}"
includes="**/${test.pattern}.java"
excludes="**/${test.exclude}.java" />
</batchtest>
<batchtest todir="${build.test}" if="testcase">
<fileset dir="${test.dir}" includes="**/${testcase}.java"/>
</batchtest>
</junit>
</target>
<target name="docs" description="Build documentation">
<exec executable="make" failonerror="true">
<arg value="-C" />
<arg value="${basedir}/src/docs" />
<arg value="BUILDROOT=${build.dir}" />
</exec>
</target>
<target name="javadoc-uptodate" depends="init">
<uptodate property="javadoc.is.uptodate">
<srcfiles dir="${src.dir}">
<include name="**/*.java" />
<include name="**/*.html" />
</srcfiles>
<mapper type="merge" to="${build.javadoc}/index.html" />
</uptodate>
</target>
<target name="javadoc" description="Build javadoc"
depends="init,javadoc-uptodate,compile" unless="javadoc.is.uptodate">
<mkdir dir="${build.javadoc}" />
<exec executable="date" outputproperty="year">
<arg value="+%Y" />
</exec>
<javadoc
packagenames="org.apache.hadoop.sqoop.*"
destdir="${build.javadoc}"
author="true"
version="true"
use="true"
windowtitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
bottom="Copyright &copy; ${year} Cloudera, Inc.">
<packageset dir="${src.dir}" />
<classpath>
<path refid="compile.classpath" />
</classpath>
</javadoc>
</target>
<target name="checkfailure" depends="test-core" if="tests.failed">
<touch file="${build.dir}/testsfailed"/>
<fail unless="continueOnFailure">Unit tests failed!</fail>
</target>
<target name="clean" description="Clean build target files">
<delete dir="${build.dir}"/>
</target>
<target name="clean-cache" description="Remove cached dependencies">
<delete dir="${user.home}/.ivy2/cache/org.apache.hadoop" />
<delete file="${ivy.jar}" />
</target>
<target name="veryclean"
depends="clean,clean-cache"
description="Clean build and remove cached dependencies">
</target>
<target name="findbugs" depends="check-for-findbugs,jar,compile-test"
if="findbugs.present" description="Run FindBugs">
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
classpath="${findbugs.home}/lib/findbugs-ant.jar" />
<mkdir dir="${findbugs.out.dir}"/>
<findbugs home="${findbugs.home}" output="xml:withMessages"
outputFile="${findbugs.output.xml.file}" effort="max"
excludeFilter="${findbugs.excludes}">
<auxClasspath>
<path refid="compile.classpath"/>
</auxClasspath>
<sourcePath path="${src.dir}" />
<sourcePath path="${test.dir}" />
<class location="${build.dir}/${dest.jar}" />
<class location="${build.test.classes}" />
</findbugs>
<xslt style="${findbugs.home}/src/xsl/default.xsl"
in="${findbugs.output.xml.file}"
out="${findbugs.output.html.file}" />
</target>
<target name="warn-findbugs-unset" unless="findbugs.home">
<fail message="You need to set -Dfindbugs.home=/path/to/findbugs" />
</target>
<target name="check-for-findbugs" depends="warn-findbugs-unset">
<available property="findbugs.present"
file="${findbugs.home}/lib/findbugs.jar" />
</target>
<target name="cobertura"
depends="check-for-cobertura,warn-cobertura-unset,jar,compile-test,test-prep"
if="cobertura.present" description="Run Cobertura (code coverage)">
<taskdef classpathref="cobertura.classpath"
resource="tasks.properties"/>
<mkdir dir="${cobertura.class.dir}" />
<cobertura-instrument todir="${cobertura.class.dir}"
datafile="${cobertura.dir}/cobertura-${cobertura.testset}.ser">
<fileset dir="${build.classes}">
<include name="**/*.class" />
</fileset>
</cobertura-instrument>
<!-- Run the unit tests, but do not fail the build if tests fail. -->
<antcall target="test-core" inheritRefs="true" />
<!-- merge the reports together from the internal and thirdparty tests -->
<delete file="${cobertura.dir}/cobertura.ser" />
<cobertura-merge datafile="${cobertura.dir}/cobertura.ser">
<fileset dir="${cobertura.dir}">
<include name="*.ser" />
</fileset>
</cobertura-merge>
<delete dir="${cobertura.report.dir}" />
<cobertura-report srcdir="${src.dir}" destdir="${cobertura.report.dir}"
format="${cobertura.format}"
datafile="${cobertura.dir}/cobertura.ser" />
</target>
<target name="warn-cobertura-unset" depends="check-for-cobertura"
unless="cobertura.present">
<fail message="You need to set -Dcobertura.home=/path/to/cobertura" />
</target>
<target name="check-for-cobertura">
<available property="cobertura.present"
file="${cobertura.home}/cobertura.jar" />
</target>
<target name="ivy-probe-antlib" >
<condition property="ivy.found">
<typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/>
</condition>
</target>
<!-- Downloads the ivy jar itself. -->
<target name="ivy-download" unless="offline">
<mkdir dir="${lib.dir}" />
<get src="${ivy_repo_url}" dest="${ivy.jar}" usetimestamp="true"/>
</target>
<target name="ivy-init-antlib" depends="ivy-download,ivy-probe-antlib"
unless="ivy.found">
<typedef uri="antlib:org.apache.ivy.ant" onerror="fail"
loaderRef="ivyLoader">
<classpath>
<pathelement location="${ivy.jar}"/>
</classpath>
</typedef>
<fail >
<condition >
<not>
<typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/>
</not>
</condition>
You need Apache Ivy 2.0 or later from http://ant.apache.org/
It could not be loaded from ${ivy_repo_url}
</fail>
</target>
<target name="ivy-init" depends="ivy-init-antlib" unless="ivy.configured">
<ivy:configure settingsid="${name}.ivy.settings" file="${ivysettings.xml}"/>
<property name="ivy.configured" value="true" />
</target>
<!-- retrieve ivy-managed artifacts for the compile configuration -->
<target name="ivy-resolve-common" depends="ivy-init">
<ivy:resolve settingsRef="${name}.ivy.settings" conf="common" />
</target>
<target name="ivy-retrieve-common" depends="ivy-resolve-common">
<ivy:retrieve settingsRef="${name}.ivy.settings"
pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" sync="true" />
<ivy:cachepath pathid="${name}.common.classpath" conf="common" />
</target>
<!-- retrieve ivy-managed artifacts for the test configuration -->
<target name="ivy-resolve-test" depends="ivy-init">
<ivy:resolve settingsRef="${name}.ivy.settings" conf="test" />
</target>
<target name="ivy-retrieve-test" depends="ivy-resolve-test">
<ivy:retrieve settingsRef="${name}.ivy.settings"
pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" sync="true" />
<ivy:cachepath pathid="${name}.test.classpath" conf="test" />
</target>
<!-- retrieve ivy-managed artifacts for the redist configuration -->
<target name="ivy-resolve-redist" depends="ivy-init">
<ivy:resolve settingsRef="${name}.ivy.settings" conf="redist" />
</target>
<target name="ivy-retrieve-redist" depends="ivy-resolve-redist">
<ivy:retrieve settingsRef="${name}.ivy.settings"
pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" sync="true" />
<ivy:cachepath pathid="${name}.redist.classpath" conf="redist" />
</target>
<!-- retrieve ivy-managed artifacts from the Hadoop distribution -->
<target name="ivy-resolve-hadoop" depends="ivy-init">
<ivy:resolve settingsRef="${name}.ivy.settings" conf="${hadoop.dist}" />
</target>
<target name="ivy-retrieve-hadoop" depends="ivy-resolve-hadoop">
<ivy:retrieve settingsRef="${name}.ivy.settings"
pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" sync="true" />
<ivy:cachepath pathid="${name}.hadoop.classpath" conf="${hadoop.dist}" />
</target>
<!-- retrieve ivy-managed test artifacts from the Hadoop distribution -->
<target name="ivy-resolve-hadoop-test" depends="ivy-init">
<ivy:resolve settingsRef="${name}.ivy.settings" conf="${hadoop.dist}test" />
</target>
<target name="ivy-retrieve-hadoop-test" depends="ivy-resolve-hadoop-test">
<ivy:retrieve settingsRef="${name}.ivy.settings"
pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}"
sync="true" />
<ivy:cachepath pathid="${name}.hadooptest.classpath"
conf="${hadoop.dist}test" />
</target>
</project>