generated from apache/template-site
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
1375 lines (1146 loc) · 42.3 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
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF 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="hadoop-release-support" default="init" basedir=".">
<description>
Module to manage release and validation of artifacts.
Maven is simply one of the targets here.
It loads three property files in order:
* build.properties: custom deployment options. User managed.
* release.properties: pointer to the real release file. SCM-managed.
* src/releases/${release.info.file}: the actual release properties
which contains things like git tag, release and RC version etc.
SCM-managed.
hadoop version is set in the property hadoop.version
build.properties is required to set source of RC tarball
Most of the complex commands are done by executing the unix commands;
this build file sets them up by building the commands properly.
For building other modules, this ant build must be on java11
and have the maven executable in the path.
Note: some libraries (e.g. Avro) have even higher requirements.
Enjoy.
Text announcement templates are in
src/text
These are expanded with property expansion.
</description>
<!-- foundational macro to fail if a property is unset; echo the valid -->
<macrodef name="show">
<attribute name="name" />
<sequential>
<echo>@{name}=${@{name}}</echo>
</sequential>
</macrodef>
<macrodef name="require">
<attribute name="p" />
<sequential>
<fail unless="@{p}" message="unset property @{p}" />
<show name="@{p}" />
</sequential>
</macrodef>
<!-- set: set a property and print its value-->
<macrodef name="set">
<attribute name="name" />
<attribute name="value" />
<sequential>
<property name="@{name}" value="@{value}" />
<show name="@{name}" />
</sequential>
</macrodef>
<!-- set: set a property to a location and print its value-->
<macrodef name="setpath">
<attribute name="name" />
<attribute name="location" />
<sequential>
<property name="@{name}" location="@{location}" />
<show name="@{name}" />
</sequential>
</macrodef>
<!-- set immutable properties for this build -->
<setpath name="dist.dir" location="${downloads.dir}/dist"/>
<setpath name="downloads.dir" location="downloads"/>
<setpath name="home" location="${user.home}"/>
<setpath name="incoming.dir" location="${downloads.dir}/incoming"/>
<setpath name="src" location="src"/>
<setpath name="target" location="target"/>
<!--
Load the user/installation specific properties.
As these fix the properties for the test of the build,
they allow for customization.
-->
<!--suppress AntResolveInspection -->
<property file="build.properties"/>
<!--
Load the release.properties file
This MUST contain an absolute/relative path to the release-info
properties file if not set in build.properties.
-->
<loadproperties srcFile="release.properties"/>
<require p="release.info.file"/>
<!-- and load the file it references.-->
<loadproperties srcFile="${release.info.file}"/>
<!--
Validate the settings, build the ant
properties, define macros etc.
-->
<target name="init" description="initialize">
<!-- base name of a release -->
<require p="hadoop.version"/>
<!-- release candidate number-->
<require p="rc"/>
<!-- commit id of the RC -->
<require p="git.commit.id"/>
<!-- JIRA ID of the release -->
<require p="http.source"/>
<require p="jira.id"/>
<!-- previous version, used in announcements -->
<require p="previous.version"/>
<!-- branch this release is from -->
<require p="release.branch"/>
<require p="asf.staging.url"/>
<set name="release" value="hadoop-${hadoop.version}"/>
<set name="rc.name" value="${hadoop.version}-${rc}"/>
<set name="rc.dirname" value="${release}-${rc}"/>
<setpath name="release.dir" location="${downloads.dir}/${rc.dirname}"/>
<setpath name="release.untar.dir" location="${downloads.dir}/untar"/>
<setpath name="release.bin.dir" location="${release.untar.dir}/bin"/>
<setpath name="release.site.dir" location="${release.untar.dir}/site"/>
<setpath name="release.source.dir" location="${release.untar.dir}/source"/>
<setpath name="site.dir" location="${release.untar.dir}/site/r${hadoop.version}"/>
<setpath name="staged.artifacts.dir" location="${staging.dir}/${rc.dirname}"/>
<set name="staging.commit.msg" value="${jira.id}. Hadoop ${rc.name} built from ${git.commit.id}" />
<set name="svn.apache.dist" value="https://dist.apache.org/"/>
<set name="svn.staging.url" value="${svn.apache.dist}/repos/dist/dev/hadoop/${rc.dirname}"/>
<set name="svn.production.url" value="${svn.apache.dist}/repos/dist/release/hadoop/common/${release}"/>
<set name="tag.name" value="release-${rc.name}"/>
<set name="production.commit.msg" value="${jira.id}. Releasing Hadoop ${hadoop.version}" />
<setpath name="bin-untar.dir" location="target/bin-untar/${release}"/>
<set name="scp.source"
value="${scp.user}@${scp.hostname}:${scp.hadoop.dir}/target/artifacts"/>
<!-- execute -->
<set name="check.native.binaries" value="true"/>
<setpath name="src.file"
location="${release.source.dir}/${release}-src"/>
<!-- ARM stuff -->
<setpath name="arm.artifact.dir" location="${arm.hadoop.dir}/target/artifacts/" />
<setpath name="arm.dir" location="${downloads.dir}/arm" />
<set name="arm.binary.prefix" value="hadoop-${hadoop.version}-aarch64" />
<set name="arm.binary.filename" value="${arm.binary.prefix}.tar.gz" />
<setpath name="arm.binary.src" location="${arm.artifact.dir}/hadoop-${hadoop.version}.tar.gz" />
<setpath name="arm.binary" location="${arm.dir}/${arm.binary.filename}" />
<setpath name="arm.binary.sha512" location="${arm.binary}.sha512" />
<setpath name="arm.binary.asc" location="${arm.binary}.asc" />
<echo>
subsidiary build options only if explicitly set
-----------------------------------------------
spark.dir = ${spark.dir}
spark.version=${spark.version}
cloudstore.dir=${cloudstore.dir}
bigdata-interop.dir=${bigdata-interop.dir}
hboss.dir=${hboss.dir}
cloud-examples.dir=${cloud-examples.dir}
cloud.test.configuration.file=${cloud.test.configuration.file}
</echo>
<!-- exec() where failures fail the build. -->
<presetdef name="x">
<exec failonerror="true"/>
</presetdef>
<presetdef name="mvn">
<x executable="mvn"/>
</presetdef>
<presetdef name="gpg">
<x executable="gpg"/>
</presetdef>
<presetdef name="gpgv">
<gpg dir="${release.dir}">
</gpg>
</presetdef>
<presetdef name="svn">
<x executable="svn"/>
</presetdef>
<!-- require a dir to exist. -->
<macrodef name="require-dir">
<attribute name="path" />
<sequential>
<fail message="dir missing: @{path}">
<condition>
<not>
<available file="@{path}"/>
</not>
</condition>
</fail>
</sequential>
</macrodef>
<!-- require a file to exist -->
<macrodef name="require-file">
<attribute name="path" />
<sequential>
<fail message="file missing: @{path}">
<condition>
<not>
<available file="@{path}"/>
</not>
</condition>
</fail>
</sequential>
</macrodef>
<presetdef name="verify-release-dir">
<require-dir path="${release.dir}" />
</presetdef>
<mkdir dir="${downloads.dir}"/>
</target>
<!--
This is just here to stop problems if you double type ant.
-->
<target name="ant">
<echo>duplicate ant on the command line</echo>
</target>
<target name="clean"
description="clean up target/ dir">
<!-- Delete the ${dist} directory trees -->
<delete dir="${target}"/>
<delete dir="${downloads.dir}"/>
</target>
<target name="purge-from-maven" depends="init"
description="purge all artifacts from the maven repo">
<property name="mvn.repo"
location="${user.home}/.m2/repository"/>
<property name="hadoop.artifacts"
location="${mvn.repo}/org/apache/hadoop"/>
<echo>
deleting ${hadoop.artifacts}/**/${hadoop.version}/*
</echo>
<delete>
<fileset dir="${hadoop.artifacts}"
includes="**/${hadoop.version}/*"/>
</delete>
</target>
<target name="mvn-test" depends="init"
description="build and test the maven module, use the build.properties hadoop version">
<mvn>
<arg value="test"/>
<arg value="-Pstaging"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="-U"/>
</mvn>
<mvn>
<arg value="dependency:tree"/>
<arg value="-Pstaging"/>
<arg value="-Dverbose"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
</mvn>
</target>
<target name="scp-artifacts" depends="init"
description="scp the artifacts from a remote host. may be slow">
<fail unless="scp.hostname"/>
<fail unless="scp.user"/>
<fail unless="scp.hadoop.dir"/>
<set name="scp.source"
value="${scp.user}@${scp.hostname}:${scp.hadoop.dir}/target/artifacts"/>
<delete dir="${incoming.dir}"/>
<mkdir dir="${incoming.dir}"/>
<echo>Downloading to ${incoming.dir}; may take a while</echo>
<!-- scp -r $srv:hadoop/target/artifacts ~/Projects/Releases
-->
<x executable="scp">
<arg value="-r"/>
<arg value="${scp.source}"/>
<arg value="${incoming.dir}"/>
</x>
</target>
<target name="copy-scp-artifacts" depends="init"
description="copy the downloaded artifacts">
<delete dir="${release.dir}"/>
<copy todir="${release.dir}">
<fileset dir="${incoming.dir}/artifacts" includes="*" />
</copy>
<echo>copies scp downloaded artifacts to ${release.dir}</echo>
</target>
<target name="release.dir.check" depends="init">
<verify-release-dir />
<echo>release.dir=${release.dir}</echo>
<x executable="ls">
<arg value="-l"/>
<arg value="-R"/>
<arg value="${release.dir}"/>
</x>
</target>
<target name="gpg.keys" depends="init"
description="fetch GPG keys">
<gpg>
<arg value="--fetch-keys"/>
<arg value="https://downloads.apache.org/hadoop/common/KEYS"/>
</gpg>
</target>
<target name="gpg.verify" depends="release.dir.check"
description="verify the downloaded artifacts">
<echo>Verifying GPG signatures of artifacts in ${release.dir}</echo>
<gpgv>
<arg value="--verify"/>
<arg value="${release}-src.tar.gz.asc"/>
</gpgv>
<gpgv>
<arg value="--verify"/>
<arg value="${release}-site.tar.gz.asc"/>
</gpgv>
<gpgv>
<arg value="--verify"/>
<arg value="${release}.tar.gz.asc"/>
</gpgv>
<gpgv>
<arg value="--verify"/>
<arg value="${release}-rat.txt.asc"/>
</gpgv>
<gpgv>
<arg value="--verify"/>
<arg value="RELEASENOTES.md.asc"/>
</gpgv>
<gpgv>
<arg value="--verify"/>
<arg value="CHANGELOG.md.asc"/>
</gpgv>
<gpgv>
<arg value="--verify"/>
<arg value="${arm.binary.filename}.asc"/>
</gpgv>
</target>
<!-- ========================================================= -->
<!-- Staging operations -->
<!-- ========================================================= -->
<target name="stage" depends="init"
description="move the RC to the svn staging dir">
<require p="staging.dir"/>
<echo>moving ${release.dir} to ${staging.dir}</echo>
<move
file="${release.dir}"
todir="${staging.dir}"/>
<x executable="ls">
<arg value="-l"/>
<arg value="${staging.dir}"/>
</x>
<x executable="ls">
<arg value="-l"/>
<arg value="${staged.artifacts.dir}"/>
</x>
<echo>
Now go run the stage-to-svn target and go and have a coffee/close JIRAs.
</echo>
</target>
<target name="staging-init"
description="init svn staging"
depends="init">
<require p="jira.id"/>
<require p="git.commit.id"/>
<echo>
staging.commit.msg = ${staging.commit.msg}
production.commit.msg = ${production.commit.msg}
svn.staging.url = ${svn.staging.url}
svn.production.url = ${svn.production.url}
</echo>
</target>
<target name="stage-to-svn"
description="stage the RC into svn"
depends="staging-init">
<svn dir="${staging.dir}">
<arg value="update" />
</svn>
<svn dir="${staging.dir}">
<arg value="add" />
<arg value="${staged.artifacts.dir}" />
</svn>
<echo>Comitting with message ${staging.commit.msg}. Please wait</echo>
<svn dir="${staging.dir}">
<arg value="commit" />
<arg value="-m" />
<arg value="${staging.commit.msg}" />
</svn>
</target>
<target name="stage-svn-rollback"
description="rollback a version staged to RC"
depends="staging-init">
<svn dir="${staging.dir}">
<arg value="update" />
</svn>
<svn dir="${staging.dir}">
<arg value="rm" />
<arg value="${staged.artifacts.dir}" />
</svn>
<echo>Comitting with message ${staging.commit.msg}. Please wait</echo>
<svn dir="${staging.dir}">
<arg value="commit" />
<arg value="-m" />
<arg value="rolling back ${staging.commit.msg}" />
</svn>
</target>
<target name="stage-svn-log"
description="print the staging svn repo log"
depends="staging-init">
<svn dir="${staging.dir}">
<arg value="log" />
</svn>
</target>
<target name="stage-move-to-production"
description="promote the staged the RC into dist"
depends="staging-init">
<svn dir="${staging.dir}">
<arg value="update" />
</svn>
<svn dir="${staging.dir}">
<arg value="info" />
<arg value="${svn.staging.url}" />
</svn>
<echo>Comitting with message ${production.commit.msg}. Please wait</echo>
<svn dir="${staging.dir}">
<arg value="move" />
<arg value="${svn.staging.url}" />
<arg value="${svn.production.url}" />
<arg value="-m" />
<arg value="${production.commit.msg}" />
</svn>
<svn dir="${staging.dir}">
<arg value="commit" />
<arg value="-m" />
<arg value="${production.commit.msg}" />
</svn>
</target>
<target name="print-tag-command"
description="print the git command to tag the rc"
depends="init">
<require p="git.commit.id"/>
<echo>
# command to tag the commit
git tag -s ${tag.name} -m "Release candidate ${rc.name}" ${git.commit.id}
# how to verify it
git tag -v ${tag.name}
# how to view the log to make sure it really is the right commit
git log tags/${tag.name}
# how to push to apache
git push apache ${tag.name}
# if needed, how to delete locally
git tag -d ${tag.name}
# if needed, how to delete it from apache
git push --delete apache ${tag.name}
# tagging the final release
git tag -s rel/release-${hadoop.version} -m "${jira.id}. Hadoop ${hadoop.version} release"
git push origin rel/release-${hadoop.version}
</echo>
</target>
<target name="vote-message"
depends="init"
description="build the vote message">
<fail unless="git.commit.id">
Set the git commit number in git.commit.id
</fail>
<fail unless="asf.staging.url">
Set the apache staging URL in asf.staging.url
</fail>
<loadfile property="message.txt"
srcFile="src/text/vote.txt">
<filterchain>
<expandproperties/>
</filterchain>
</loadfile>
<property name="message.out"
location="${target}/vote.txt"/>
<echo>${message.txt}</echo>
<echo file="${message.out}">${message.txt}</echo>
<echo>
----------
Message is in file ${message.out}
</echo>
</target>
<!-- ========================================================= -->
<!-- Spark -->
<!-- ========================================================= -->
<!--
spark-specific init options etc
-->
<target name="spark.init" if="spark.dir"
depends="init">
<!-- for spark builds -->
<set name="spark.version" value="3.5.0-SNAPSHOT"/>
<!-- spark excludes hadoop-aws dependency and forces in their own
this fixes it to be in sync with hadoop
see https://issues.apache.org/jira/browse/SPARK-39969
-->
<set name="spark.aws.version" value="1.12.316"/>
</target>
<target name="spark.build" if="spark.dir"
depends="spark.init"
description="build the spark release in spark.dir">
<echo>
Note: this build includes kinesis and hadoop cloud artifacts;
builds the full tarball in assembly/target which can be used for
spark-standalone and cluster testing.
Note, SPARK-41392 highlights some build problems on trunk;
until fixed expect failures to occur on the trunk branch.
the branch-3.3 line MUST work to qualify the build.
</echo>
<mvn dir="${spark.dir}">
<arg value="-Psnapshots-and-staging"/>
<arg value="-Phadoop-cloud"/> <!-- cloud module -->
<arg value="-Pyarn"/>
<arg value="-Pkinesis-asl"/> <!-- kinesis -->
<arg value="-Pbigtop-dist"/> <!-- build the distribution -->
<arg value="-DskipTests"/>
<arg value="-Dmaven.javadoc.skip=true"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="-Daws.java.sdk.version=${spark.aws.version}"/> <!-- kinesis module to use the same aws jar-->
<arg value="clean"/>
<arg value="install"/>
</mvn>
</target>
<target name="spark.test.hadoop-cloud" if="spark.dir"
depends="init"
description="run the spark-hadoop-cloud tests in spark.dir">
<echo>
Test spark hadoop-cloud.
Requires the full spark build to have already been executed
</echo>
<mvn dir="${spark.dir}">
<arg value="-Psnapshots-and-staging"/>
<arg value="-Phadoop-cloud"/> <!-- cloud module -->
<arg value="--pl"/>
<arg value="hadoop-cloud"/>
<arg value="-Dmaven.javadoc.skip=true"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="test"/>
</mvn>
</target>
<target name="cloud-examples.build" if="cloud-examples.dir"
depends="init"
description="build the cloud examples release">
<echo>
Build the cloud examples;
spark MUST have been built against this release first.
</echo>
<mvn dir="${cloud-examples.dir}">
<arg value="-Psnapshots-and-staging"/>
<arg value="-Dspark-3.4"/>
<arg value="-Dspark.version=${spark.version}"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="clean"/>
<arg value="install"/>
<arg value="-DskipTests"/>
</mvn>
</target>
<target name="cloud-examples.test"
if="cloud-examples.dir"
depends="cloud-examples.build"
description="test the cloud examples">
<echo>
Test the cloud examples;
1. cloud.test.configuration.file MUST point to the xml file with binding info.
2. spark MUST have been built against this release first.
3. Java 11+ only.
</echo>
<require p="cloud.test.configuration.file" />
<mvn dir="${cloud-examples.dir}">
<arg value="-Psnapshots-and-staging"/>
<arg value="-Dspark-3.4"/>
<arg value="-Pscale"/>
<arg value="-Dscale.test.enabled=true"/>
<arg value="-Dspark.version=${spark.version}"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="-Dcloud.test.configuration.file=${cloud.test.configuration.file}"/>
<arg value="test"/>
</mvn>
</target>
<!-- ========================================================= -->
<!-- Google GCS. Java 11+ -->
<!-- ========================================================= -->
<target name="gcs.build" if="bigdata-interop.dir"
depends="init"
description="Build the google gcs artifacts">
<echo>
Build the google gcs artifacts.
requires bigdata-interop.dir to be set to the base
of a copy of
https://github.com/GoogleCloudPlatform/bigdata-intero
</echo>
<mvn dir="${bigdata-interop.dir}">
<arg value="-Pasf-staging"/>
<arg value="-DskipTests"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="clean"/>
<arg value="package"/>
<arg value="install"/>
</mvn>
</target>
<target name="gi" if="bigdata-interop.dir"
depends="init"
description="Build and test the google gcs artifacts">
<echo>
Test the google gcs artifacts. Requires GCS credentials.
</echo>
<mvn dir="${bigdata-interop.dir}">
<arg value="-Pasf-staging"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="clean"/>
<arg value="package"/>
<arg value="install"/>
</mvn>
</target>
<!-- ========================================================= -->
<!-- HBoss: hbase filesystem wrapper -->
<!-- uses aws sdk APIs for its mocking -->
<!-- ========================================================= -->
<target name="hboss.build" if="hboss.dir"
depends="init"
description="Build the hboss artifacts">
<echo>
Build the HBase HBoss module.
It's test are brittle to s3a internal changes, just because
it needs to plug in its own s3 client.
asf-staging is a profile in stevel's ~/.m2/settings.xml to
use the asf staging reop.
</echo>
<mvn dir="${hboss.dir}">
<arg value="-Pasf-staging"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="-Dhadoop33.version=${hadoop.version}"/>
<arg value="clean"/>
<arg value="install"/>
<arg value="-DskipTests"/>
</mvn>
</target>
<target name="hboss.test" if="hboss.dir"
depends="init"
description="Build and test the hboss artifacts">
<echo>
Build the HBase HBoss module.
It's test are brittle to s3a internal changes, just because
it needs to plug in its own s3 client.
asf-staging is a profile in stevel's ~/.m2/settings.xml to
use the asf staging reop.
</echo>
<mvn dir="${hboss.dir}">
<arg value="-T 1C"/>
<arg value="-Pasf-staging"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="-Dhadoop33.version=${hadoop.version}"/>
<arg value="clean"/>
<arg value="install"/>
</mvn>
</target>
<!-- ========================================================= -->
<!-- https://github.com/steveloughran/cloudstore -->
<!-- ========================================================= -->
<target name="cloudstore.build" if="cloudstore.dir"
depends="init"
description="Build the cloudstore artifacts">
<echo>
Build the cloudstore module.
if this is done with java11, it shouldn't be released.
</echo>
<require p="cloudstore.profile"/>
<mvn dir="${cloudstore.dir}">
<arg value="-Psnapshots-and-staging"/>
<arg value="-P${cloudstore.profile}"/>
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="clean"/>
<arg value="package"/>
<arg value="test"/>
</mvn>
</target>
<!-- ========================================================= -->
<!-- Hadoop FS API shim WiP -->
<!-- ========================================================= -->
<target name="fsapi.test" if="fs-api-shim.dir"
depends="init"
description="Build and test fs-api-shim">
<echo>
Build the fs api shim module.
This MUST build against hadoop-3.2.0; the test version is
what we want here.
</echo>
<mvn dir="${fs-api-shim.dir}">
<arg value="-Psnapshots-and-staging"/>
<arg value="-Dhadoop.test.version=${hadoop.version}"/>
<arg value="clean"/>
<arg value="test"/>
</mvn>
</target>
<!-- ========================================================= -->
<!-- Parquet -->
<!-- ========================================================= -->
<target name="parquet.build" if="parquet.dir"
depends="init"
description="Build parquet">
<echo>
Build the parquet jars.
There's no profile for using ASF staging as a source for artifacts.
Run this after other builds so the files are already present
</echo>
<mvn dir="${parquet.dir}">
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="-Pasf-staging"/>
<!-- <arg value="--pl"/>
<arg value="parquet-hadoop"/>-->
<arg value="clean"/>
<arg value="install"/>
<arg value="-DskipTests"/>
</mvn>
</target>
<target name="parquet.test" if="parquet.dir"
depends="parquet.build"
description="Build and test the parquet-hadoop module">
<echo>
Build and test parquet-hadoop.
There's no profile for using ASF staging as a source for artifacts.
Run this after other builds so the files are already present
</echo>
<mvn dir="${parquet.dir}">
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="--pl"/>
<arg value="parquet-hadoop"/>
<arg value="install"/>
</mvn>
</target>
<!-- ========================================================= -->
<!-- Avro. Needs lots of jdk installations. -->
<!-- ========================================================= -->
<target name="avro.build" if="avro.dir"
depends="init"
description="Build avro">
<echo>
Build avro.
* Relies on the user having an asf-staging profile.
* needs a java8 toolchain set up
https://maven.apache.org/guides/mini/guide-using-toolchains.html
</echo>
<mvn dir="${avro.dir}/lang/java">
<arg value="-Dhadoop.version=${hadoop.version}"/>
<arg value="-Pasf-staging"/>
<arg value="clean"/>
<arg value="install"/>
<arg value="-DskipTests"/>
</mvn>
</target>
<!-- ========================================================= -->
<!-- Release targets -->
<!-- ========================================================= -->
<!-- Fetch the artifacts from an http repo, for validating someone else's release.
the download is into incoming.dir, then after a cleanup copied into release.dir; -->
<target name="release.fetch.wget" depends="init"
description="fetch the artifacts from a remote http site with wget. may be slow">
<fail unless="http.source"/>
<delete dir="${incoming.dir}"/>
<mkdir dir="${incoming.dir}"/>
<!-- list and then wget the immediate children into the incoming dir -->
<x executable="wget" dir="${incoming.dir}" >
<arg value="--no-parent"/>
<arg value="--recursive"/>
<arg value="--level=5"/>
<arg value="-e"/>
<arg value="robots=off"/>
<arg value="-R"/>
<arg value="index.html"/>
<arg value="--report-speed=bits"/>
<arg value="--no-directories"/>
<arg value="${http.source}/"/>
</x>
<!-- remove all index.html files which crept in -->
<!--<delete dir="${incoming.dir}" includes="index.*" />-->
<delete dir="${release.dir}"/>
<move
file="${incoming.dir}"
tofile="${release.dir}"/>
<echo>copied http downloaded artifacts to ${release.dir}</echo>
</target>
<!-- Fetch the artifacts from an http repo, for validating someone else's release.
the download is into incoming.dir, then after a cleanup copied into release.dir;
CHANGELOG.md
CHANGELOG.md.asc
CHANGELOG.md.sha512
RELEASENOTES.md
RELEASENOTES.md.asc
RELEASENOTES.md.sha512
hadoop-3.4.0-aarch64.tar.gz
hadoop-3.4.0-aarch64.tar.gz.asc
hadoop-3.4.0-aarch64.tar.gz.sha512
hadoop-3.4.0-rat.txt
hadoop-3.4.0-rat.txt.asc
hadoop-3.4.0-rat.txt.sha512
hadoop-3.4.0-site.tar.gz
hadoop-3.4.0-site.tar.gz.asc
hadoop-3.4.0-site.tar.gz.sha512
hadoop-3.4.0-src.tar.gz
hadoop-3.4.0-src.tar.gz.asc
hadoop-3.4.0-src.tar.gz.sha512
hadoop-3.4.0.tar.gz
hadoop-3.4.0.tar.gz.asc
hadoop-3.4.0.tar.gz.sha512
-->
<target name="release.fetch.http" depends="init"
description="fetch the artifacts from a remote http site with wget. may be slow">
<fail unless="http.source"/>
<mkdir dir="${incoming.dir}"/>
<!-- download the artfact plus signature and checkshums -->
<macrodef name="download">
<attribute name="artifact" />
<sequential>
<get
dest="${incoming.dir}"
skipexisting="true"
verbose="true"
usetimestamp="true">
<url url="${http.source}/@{artifact}" />
<url url="${http.source}/@{artifact}.asc" />
<url url="${http.source}/@{artifact}.sha512" />
</get>
</sequential>
</macrodef>
<!-- do a parallel fetch to avoid waiting quite as long for data. -->
<parallel threadsPerProcessor="4">
<download artifact="CHANGELOG.md"/>
<download artifact="RELEASENOTES.md"/>
<download artifact="${release}.tar.gz"/>
<download artifact="${release}-aarch64.tar.gz"/>
<download artifact="${release}-site.tar.gz"/>
<download artifact="${release}-src.tar.gz"/>
<download artifact="${release}-rat.txt"/>
</parallel>
<delete dir="${release.dir}"/>
<move
file="${incoming.dir}"
tofile="${release.dir}"/>
<echo>copied http downloaded artifacts to ${release.dir}</echo>
</target>
<target name="release.fetch.arm" depends="init"
description="fetch the arm artifacts from a remote http site">
<fail unless="http.source"/>
<mkdir dir="${incoming.dir}"/>
<get src="${http.source}/${arm.binary.filename}"
dest="${incoming.dir}"
verbose="true"
usetimestamp="true"/>
</target>
<target name="release.site.untar" depends="release.dir.check"
description="untar the release site">
<echo>untarring site ${release.dir}/${release}-site.tar.gz</echo>
<mkdir dir="target/untar"/>
<gunzip src="${release.dir}/${release}-site.tar.gz" dest="target/untar"/>
<untar src="target/untar/${release}-site.tar" dest="${release.site.dir}" />