forked from apache/cassandra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
2502 lines (2309 loc) · 130 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 basedir="." default="jar" name="xiaodizi-cassandra"
xmlns:artifact="antlib:org.apache.maven.artifact.ant"
xmlns:if="ant:if"
xmlns:unless="ant:unless">
<!-- <fail message="You need to use Ant of version at least 1.10 to continue.">-->
<!-- <condition>-->
<!-- <not>-->
<!-- <antversion atleast="1.10"/>-->
<!-- </not>-->
<!-- </condition>-->
<!-- </fail>-->
<property environment="env"/>
<property file="build.properties"/>
<property file="build.properties.default"/>
<property name="debuglevel" value="source,lines,vars"/>
<!-- default version and SCM information -->
<property name="base.version" value="4.1.1"/>
<property name="scm.connection" value="scm:git:https://github.com/xiaodizi/cassandra.git"/>
<property name="scm.developerConnection" value="scm:git:[email protected]:xiaodizi/cassandra.git"/>
<property name="scm.url" value="https://github.com/xiaodizi/cassandra"/>
<!-- directory details -->
<property name="basedir" value="."/>
<property name="build.src" value="${basedir}/src"/>
<property name="build.src.java" value="${basedir}/src/java"/>
<property name="build.src.antlr" value="${basedir}/src/antlr"/>
<property name="build.src.resources" value="${basedir}/src/resources"/>
<property name="build.src.gen-java" value="${basedir}/src/gen-java"/>
<property name="build.lib" value="${basedir}/lib"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.dir.lib" value="${basedir}/build/lib"/>
<property name="build.test.dir" value="${build.dir}/test"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.classes.main" value="${build.classes}/main"/>
<property name="javadoc.dir" value="${build.dir}/javadoc"/>
<property name="interface.dir" value="${basedir}/interface"/>
<property name="test.dir" value="${basedir}/test"/>
<property name="test.resources" value="${test.dir}/resources"/>
<property name="test.lib" value="${build.dir}/test/lib"/>
<property name="test.classes" value="${build.dir}/test/classes"/>
<property name="test.conf" value="${test.dir}/conf"/>
<property name="test.data" value="${test.dir}/data"/>
<property name="test.name" value="*Test"/>
<property name="test.classlistfile" value="testlist.txt"/>
<property name="test.classlistprefix" value="unit"/>
<property name="benchmark.name" value=""/>
<property name="test.methods" value=""/>
<property name="test.anttasks.src" value="${test.dir}/anttasks"/>
<property name="test.unit.src" value="${test.dir}/unit"/>
<property name="test.long.src" value="${test.dir}/long"/>
<property name="test.burn.src" value="${test.dir}/burn"/>
<property name="test.memory.src" value="${test.dir}/memory"/>
<property name="test.microbench.src" value="${test.dir}/microbench"/>
<property name="test.distributed.src" value="${test.dir}/distributed"/>
<property name="test.compression.algo" value="LZ4"/>
<property name="test.simulator.src" value="${test.dir}/simulator/main"/>
<property name="test.simulator-asm.src" value="${test.dir}/simulator/asm"/>
<property name="test.simulator-bootstrap.src" value="${test.dir}/simulator/bootstrap"/>
<property name="test.simulator-test.src" value="${test.dir}/simulator/test"/>
<property name="test.driver.connection_timeout_ms" value="10000"/>
<property name="test.driver.read_timeout_ms" value="24000"/>
<property name="test.jvm.args" value=""/>
<property name="dist.dir" value="${build.dir}/dist"/>
<property name="tmp.dir" value="${java.io.tmpdir}"/>
<property name="doc.dir" value="${basedir}/doc"/>
<condition property="version" value="${base.version}">
<isset property="release"/>
</condition>
<property name="version" value="${base.version}-SNAPSHOT"/>
<property name="version.properties.dir"
value="${build.src.resources}/org/apache/cassandra/config/"/>
<property name="final.name" value="${ant.project.name}-${version}"/>
<property name="local.repository" value="${user.home}/.m2/repository"/>
<property name="download.file" value="./lib/"/>
<!-- details of what version of Maven ANT Tasks to fetch -->
<property name="maven-ant-tasks.version" value="2.1.3"/>
<property name="maven-ant-tasks.local" value="${local.repository}/org/apache/maven/maven-ant-tasks"/>
<property name="maven-ant-tasks.url"
value="https://repo.maven.apache.org/maven2/org/apache/maven/maven-ant-tasks"/>
<!-- details of how and which Maven repository we publish to -->
<property name="maven.version" value="3.0.3"/>
<condition property="maven-repository-url"
value="https://repository.apache.org/service/local/staging/deploy/maven2">
<isset property="release"/>
</condition>
<condition property="maven-repository-id" value="apache.releases.https">
<isset property="release"/>
</condition>
<property name="maven-repository-url" value="https://repository.apache.org/content/repositories/snapshots"/>
<property name="maven-repository-id" value="apache.snapshots.https"/>
<property name="test.timeout" value="480000"/>
<property name="test.memory.timeout" value="480000"/>
<property name="test.long.timeout" value="600000"/>
<property name="test.burn.timeout" value="60000000"/>
<property name="test.distributed.timeout" value="900000"/>
<property name="test.simulation.timeout" value="1800000"/>
<!-- default for cql tests. Can be overridden by -Dcassandra.test.use_prepared=false -->
<property name="cassandra.test.use_prepared" value="true"/>
<!-- The number of active processors seen by JVM -->
<property name="cassandra.test.processorCount" value="2"/>
<!-- skip flushing schema tables during tests -->
<property name="cassandra.test.flush_local_schema_changes" value="false"/>
<!-- fast shutdown of messaging service -->
<property name="cassandra.test.messagingService.nonGracefulShutdown" value="true"/>
<!-- https://www.eclemma.org/jacoco/ -->
<property name="jacoco.export.dir" value="${build.dir}/jacoco/"/>
<property name="jacoco.partials.dir" value="${jacoco.export.dir}/partials"/>
<property name="jacoco.partialexecfile" value="${jacoco.partials.dir}/partial.exec"/>
<property name="jacoco.finalexecfile" value="${jacoco.export.dir}/jacoco.exec"/>
<property name="jacoco.version" value="0.8.8"/>
<property name="byteman.version" value="4.0.6"/>
<property name="jamm.version" value="0.3.2"/>
<property name="ecj.version" value="4.6.1"/>
<property name="ohc.version" value="0.5.1"/>
<property name="asm.version" value="9.1"/>
<property name="allocation-instrumenter.version" value="3.1.0"/>
<property name="bytebuddy.version" value="1.10.10"/>
<property name="jflex.version" value="1.8.2"/>
<!-- https://mvnrepository.com/artifact/net.openhft/chronicle-bom/1.16.23 -->
<property name="chronicle-queue.version" value="5.20.123"/>
<property name="chronicle-core.version" value="2.20.126"/>
<property name="chronicle-bytes.version" value="2.20.111"/>
<property name="chronicle-wire.version" value="2.20.117"/>
<property name="chronicle-threads.version" value="2.20.111"/>
<property name="dtest-api.version" value="0.0.13"/>
<property name="fastjson2.version" value="2.0.21" />
<property name="unirest-java.version" value="1.4.9" />
<condition property="maven-ant-tasks.jar.exists">
<available file="${build.dir}/maven-ant-tasks-${maven-ant-tasks.version}.jar"/>
</condition>
<condition property="maven-ant-tasks.jar.local">
<available
file="${maven-ant-tasks.local}/${maven-ant-tasks.version}/maven-ant-tasks-${maven-ant-tasks.version}.jar"/>
</condition>
<condition property="is.source.artifact">
<available file="${build.src.java}" type="dir"/>
</condition>
<condition property="cassandra.use_nix_recursive_delete" value="false" else="true">
<os family="windows"/>
</condition>
<!-- Check if all tests are being run or just one. If it's all tests don't spam the console with test output.
If it's an individual test print the output from the test under the assumption someone is debugging the test
and wants to know what is going on without having to context switch to the log file that is generated.
Debug level output still needs to be retrieved from the log file. -->
<macrodef name="keepbrief">
<sequential>
<javac srcdir="test/anttasks" destdir="${test.classes}" includeantruntime="true"/>
<taskdef name="KeepBriefBrief" classname="org.apache.cassandra.anttasks.KeepBriefBrief"
classpath="${test.classes}"/>
<KeepBriefBrief property="cassandra.keepBriefBrief"/>
</sequential>
</macrodef>
<condition property="java.version.8">
<equals arg1="${ant.java.version}" arg2="1.8"/>
</condition>
<condition property="java.version.11">
<not>
<isset property="java.version.8"/>
</not>
</condition>
<fail>
<condition>
<not>
<or>
<isset property="java.version.8"/>
<isset property="java.version.11"/>
</or>
</not>
</condition>
</fail>
<resources id="_jvm11_arg_items">
<string>-Djdk.attach.allowAttachSelf=true</string>
<string>-XX:+UseConcMarkSweepGC</string>
<string>-XX:+CMSParallelRemarkEnabled</string>
<string>-XX:SurvivorRatio=8</string>
<string>-XX:MaxTenuringThreshold=1</string>
<string>-XX:CMSInitiatingOccupancyFraction=75</string>
<string>-XX:+UseCMSInitiatingOccupancyOnly</string>
<string>-XX:CMSWaitDuration=10000</string>
<string>-XX:+CMSParallelInitialMarkEnabled</string>
<string>-XX:+CMSEdenChunksRecordAlways</string>
<string>--add-exports java.base/jdk.internal.misc=ALL-UNNAMED</string>
<string>--add-exports java.base/jdk.internal.ref=ALL-UNNAMED</string>
<string>--add-exports java.base/sun.nio.ch=ALL-UNNAMED</string>
<string>--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED</string>
<string>--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED</string>
<string>--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED</string>
<string>--add-exports java.sql/java.sql=ALL-UNNAMED</string>
<string>--add-opens java.base/java.lang.module=ALL-UNNAMED</string>
<string>--add-opens java.base/java.net=ALL-UNNAMED</string>
<string>--add-opens java.base/jdk.internal.loader=ALL-UNNAMED</string>
<string>--add-opens java.base/jdk.internal.ref=ALL-UNNAMED</string>
<string>--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED</string>
<string>--add-opens java.base/jdk.internal.math=ALL-UNNAMED</string>
<string>--add-opens java.base/jdk.internal.module=ALL-UNNAMED</string>
<string>--add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED</string>
<string>--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED</string>
</resources>
<pathconvert property="_jvm_args_concat" refid="_jvm11_arg_items" pathsep=" "/>
<condition property="java11-jvmargs" value="${_jvm_args_concat}" else="">
<not>
<equals arg1="${ant.java.version}" arg2="1.8"/>
</not>
</condition>
<!--
JVM arguments for tests.
There is a race condition bug in java 11 (see CASSANDRA-15981) which causes a crash of the
JVM; this race is between CMS and class unloading. In java 8 we can cap the metaspace to
make tests stable on low resource environments, but in java 11 we need to make it unlimited
(don't define MaxMetaspaceSize) and disable class unloading in CMS outside of a
stop-the-world pause.
In java 11 we also need to set a system property to enable netty to use Unsafe direct byte
buffer construction (see CASSANDRA-16493)
-->
<resources id="_jvm8_test_arg_items">
<!-- TODO see CASSANDRA-16212 - we seem to OOM non stop now after CASSANDRA-16212, so to have clean CI while this gets looked into, disabling limiting metaspace
<string>-XX:MaxMetaspaceExpansion=64M</string>
<string>-XX:MaxMetaspaceSize=512M</string>
<string>-XX:MetaspaceSize=128M</string>
-->
</resources>
<pathconvert property="_jvm8_test_arg_items_concat" refid="_jvm8_test_arg_items" pathsep=" "/>
<resources id="_jvm11_test_arg_items">
<string>-XX:-CMSClassUnloadingEnabled</string>
<string>-Dio.netty.tryReflectionSetAccessible=true</string>
</resources>
<pathconvert property="_jvm11_test_arg_items_concat" refid="_jvm11_test_arg_items" pathsep=" "/>
<condition property="_std-test-jvmargs" value="${_jvm11_test_arg_items_concat}"
else="${_jvm8_test_arg_items_concat}">
<not>
<equals arg1="${ant.java.version}" arg2="1.8"/>
</not>
</condition>
<!-- needed to compile org.apache.cassandra.utils.JMXServerUtils -->
<condition property="jdk11-javac-exports" value="--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED" else="">
<not>
<equals arg1="${ant.java.version}" arg2="1.8"/>
</not>
</condition>
<condition property="jdk11-javadoc-exports" value="${jdk11-javac-exports} --frames" else="">
<not>
<equals arg1="${ant.java.version}" arg2="1.8"/>
</not>
</condition>
<condition property="build.java.11">
<istrue value="${use.jdk11}"/>
</condition>
<condition property="source.version" value="8" else="11">
<equals arg1="${java.version.8}" arg2="true"/>
</condition>
<condition property="target.version" value="8" else="11">
<equals arg1="${java.version.8}" arg2="true"/>
</condition>
<!--
Add all the dependencies.
-->
<path id="maven-ant-tasks.classpath" path="${build.dir}/maven-ant-tasks-${maven-ant-tasks.version}.jar"/>
<path id="cassandra.classpath">
<pathelement location="${build.classes.main}"/>
<fileset dir="${build.dir.lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="cassandra.classpath.test">
<file file="${build.dir}/${final.name}.jar"/> <!-- we need the jar for tests and benchmarks (multi-version jar) -->
<fileset dir="${build.dir.lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${test.lib}/jars">
<include name="**/*.jar"/>
<exclude name="**/ant-*.jar"/>
</fileset>
</path>
<macrodef name="create-javadoc">
<attribute name="destdir"/>
<element name="filesets"/>
<sequential>
<javadoc destdir="@{destdir}" author="true" version="true" use="true"
windowtitle="${ant.project.name} API" classpathref="cassandra.classpath"
bottom="Copyright &copy; 2009- The Apache Software Foundation"
useexternalfile="yes" encoding="UTF-8" failonerror="false"
maxmemory="256m" additionalparam="${jdk11-javadoc-exports}">
<filesets/>
</javadoc>
<fail message="javadoc failed">
<condition>
<not>
<available file="@{destdir}/index-all.html"/>
</not>
</condition>
</fail>
</sequential>
</macrodef>
<target name="ant-lei">
<echo>Hello, from Ant</echo>
</target>
<target name="validate-build-conf">
<condition property="use-jdk11">
<or>
<isset property="build.java.11"/>
<istrue value="${env.CASSANDRA_USE_JDK11}"/>
</or>
</condition>
<fail message="Inconsistent JDK11 options set">
<condition>
<and>
<istrue value="${env.CASSANDRA_USE_JDK11}"/>
<isset property="use.jdk11"/>
<not>
<istrue value="${use.jdk11}"/>
</not>
</and>
</condition>
</fail>
<fail message="Inconsistent JDK11 options set">
<condition>
<and>
<isset property="env.CASSANDRA_USE_JDK11"/>
<not>
<istrue value="${env.CASSANDRA_USE_JDK11}"/>
</not>
<istrue value="${use.jdk11}"/>
</and>
</condition>
</fail>
<fail message="-Duse.jdk11=true or $CASSANDRA_USE_JDK11=true cannot be set when building from java 8">
<condition>
<not>
<or>
<not>
<isset property="java.version.8"/>
</not>
<not>
<isset property="use-jdk11"/>
</not>
</or>
</not>
</condition>
</fail>
<fail message="-Duse.jdk11=true or $CASSANDRA_USE_JDK11=true must be set when building from java 11">
<condition>
<not>
<or>
<isset property="java.version.8"/>
<isset property="use-jdk11"/>
</or>
</not>
</condition>
</fail>
</target>
<!--
Setup the output directories.
-->
<target name="init" depends="validate-build-conf">
<fail unless="is.source.artifact"
message="Not a source artifact, stopping here."/>
<mkdir dir="${build.classes.main}"/>
<mkdir dir="${test.lib}"/>
<mkdir dir="${test.classes}"/>
<mkdir dir="${stress.test.classes}"/>
<mkdir dir="${fqltool.test.classes}"/>
<mkdir dir="${build.src.gen-java}"/>
<mkdir dir="${build.dir.lib}"/>
<mkdir dir="${jacoco.export.dir}"/>
<mkdir dir="${jacoco.partials.dir}"/>
</target>
<target name="clean" description="Remove all locally created artifacts">
<delete dir="${build.test.dir}"/>
<delete dir="${build.classes}"/>
<delete dir="${build.src.gen-java}"/>
<delete dir="${version.properties.dir}"/>
<delete dir="${jacoco.export.dir}"/>
<delete dir="${jacoco.partials.dir}"/>
</target>
<target depends="clean" name="cleanall"/>
<target name="realclean" depends="clean"
description="Remove the entire build directory and all downloaded artifacts">
<delete>
<fileset dir="${build.lib}" excludes="cassandra-driver-internal-only-*,puresasl-internal-only-*"/>
</delete>
<delete dir="${build.dir}"/>
<delete dir="${doc.dir}/build"/>
<delete dir="${doc.dir}/source/tools/nodetool"/>
</target>
<!--
This generates the CQL grammar files from Cql.g
-->
<target name="check-gen-cql3-grammar">
<uptodate property="cql3current"
targetfile="${build.src.gen-java}/org/apache/cassandra/cql3/Cql.tokens">
<srcfiles dir="${build.src.antlr}">
<include name="*.g"/>
</srcfiles>
</uptodate>
</target>
<target name="gen-cql3-grammar" depends="check-gen-cql3-grammar" unless="cql3current">
<echo>Building Grammar ${build.src.antlr}/Cql.g ...</echo>
<java classname="org.antlr.Tool"
classpathref="cql3-grammar.classpath"
failonerror="true">
<arg value="-Xconversiontimeout"/>
<arg value="10000"/>
<arg value="${build.src.antlr}/Cql.g"/>
<arg value="-fo"/>
<arg value="${build.src.gen-java}/org/apache/cassandra/cql3/"/>
<arg value="-Xmaxinlinedfastates"/>
<arg value="10"/> <!-- default is 60 -->
</java>
</target>
<target name="generate-cql-html" depends="resolver-init" description="Generate HTML from textile source">
<taskdef classpathref="wikitext.classpath" resource="wikitexttasks.properties"/>
<wikitext-to-html markupLanguage="Textile">
<fileset dir="${basedir}">
<include name="doc/cql3/*.textile"/>
</fileset>
</wikitext-to-html>
</target>
<target name="gen-asciidoc" description="Generate dynamic asciidoc pages" depends="jar" unless="ant.gen-doc.skip">
<exec executable="make" osfamily="unix" dir="${doc.dir}">
<arg value="gen-asciidoc"/>
</exec>
</target>
<target name="gen-doc" description="Generate documentation" depends="gen-asciidoc,generate-cql-html"
unless="ant.gen-doc.skip">
<exec executable="make" osfamily="unix" dir="${doc.dir}">
<arg value="html"/>
</exec>
</target>
<!--
Generates Java sources for tokenization support from jflex
grammar files
-->
<target name="generate-jflex-java" description="Generate Java from jflex grammar">
<taskdef classname="jflex.anttask.JFlexTask" classpathref="jflex.classpath" name="jflex"/>
<jflex file="${build.src.java}/org/apache/cassandra/index/sasi/analyzer/StandardTokenizerImpl.jflex"
destdir="${build.src.gen-java}/"/>
</target>
<!--
Fetch Maven Ant Tasks and Cassandra's dependencies
These targets are intentionally free of dependencies so that they
can be run stand-alone from a binary release artifact.
-->
<target name="maven-ant-tasks-localrepo" unless="maven-ant-tasks.jar.exists" if="maven-ant-tasks.jar.local"
depends="init" description="Fetch Maven ANT Tasks from Maven Local Repository">
<copy file="${maven-ant-tasks.local}/${maven-ant-tasks.version}/maven-ant-tasks-${maven-ant-tasks.version}.jar"
tofile="${build.dir}/maven-ant-tasks-${maven-ant-tasks.version}.jar"/>
<property name="maven-ant-tasks.jar.exists" value="true"/>
</target>
<target name="maven-ant-tasks-download" depends="init,maven-ant-tasks-localrepo" unless="maven-ant-tasks.jar.exists"
description="Fetch Maven ANT Tasks from Maven Central Repositroy">
<echo>Downloading Maven ANT Tasks...</echo>
<get src="${maven-ant-tasks.url}/${maven-ant-tasks.version}/maven-ant-tasks-${maven-ant-tasks.version}.jar"
dest="${build.dir}/maven-ant-tasks-${maven-ant-tasks.version}.jar" usetimestamp="true"/>
<copy file="${build.dir}/maven-ant-tasks-${maven-ant-tasks.version}.jar"
tofile="${maven-ant-tasks.local}/${maven-ant-tasks.version}/maven-ant-tasks-${maven-ant-tasks.version}.jar"/>
</target>
<target name="maven-ant-tasks-init" depends="maven-ant-tasks-download,resolver-init"
unless="maven-ant-tasks.initialized"
description="Initialize Maven ANT Tasks">
<typedef uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath"/>
<property name="maven-ant-tasks.initialized" value="true"/>
</target>
<!-- this task defines the dependencies that will be fetched by Maven ANT Tasks
the dependencies are re-used for publishing artifacts to Maven Central
in order to keep everything consistent -->
<!-- 这个任务定义了Maven ANT任务将要获取的依赖
在向Maven Central发布工件时,将重用依赖项
为了保持一切的一致性 -->
<target name="maven-declare-dependencies" depends="maven-ant-tasks-init"
description="Define dependencies and dependency versions">
<!-- The parent pom defines the versions of all dependencies -->
<artifact:pom id="parent-pom"
groupId="org.apache.cassandra"
artifactId="cassandra-parent"
packaging="pom"
version="${version}"
url="https://cassandra.apache.org"
name="Apache Cassandra"
inceptionYear="2009"
description="The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together Dynamo's fully distributed design and Bigtable's ColumnFamily-based data model.">
<!-- Inherit from the ASF template pom file, ref http://maven.apache.org/pom/asf/ -->
<parent groupId="org.apache" artifactId="apache" version="22"/>
<license name="The Apache Software License, Version 2.0"
url="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
<scm connection="${scm.connection}" developerConnection="${scm.developerConnection}" url="${scm.url}"/>
<dependencyManagement>
<dependency groupId="org.xerial.snappy" artifactId="snappy-java" version="1.1.8.4"/>
<dependency groupId="org.lz4" artifactId="lz4-java" version="1.8.0"/>
<dependency groupId="com.ning" artifactId="compress-lzf" version="0.8.4" scope="provided"/>
<dependency groupId="com.github.luben" artifactId="zstd-jni" version="1.5.4-1"/>
<dependency groupId="com.google.guava" artifactId="guava" version="27.0-jre">
<exclusion groupId="com.google.code.findbugs" artifactId="jsr305"/>
<exclusion groupId="org.codehaus.mojo" artifactId="animal-sniffer-annotations"/>
<exclusion groupId="com.google.guava" artifactId="listenablefuture"/>
<exclusion groupId="com.google.guava" artifactId="failureaccess"/>
<exclusion groupId="org.checkerframework" artifactId="checker-qual"/>
<exclusion groupId="com.google.errorprone" artifactId="error_prone_annotations"/>
</dependency>
<dependency groupId="com.google.jimfs" artifactId="jimfs" version="1.1"/>
<dependency groupId="org.hdrhistogram" artifactId="HdrHistogram" version="2.1.9"/>
<dependency groupId="commons-cli" artifactId="commons-cli" version="1.1"/>
<dependency groupId="commons-codec" artifactId="commons-codec" version="1.9"/>
<dependency groupId="commons-io" artifactId="commons-io" version="2.6"/>
<dependency groupId="org.apache.commons" artifactId="commons-lang3" version="3.11"/>
<dependency groupId="org.apache.commons" artifactId="commons-math3" version="3.2"/>
<dependency groupId="org.antlr" artifactId="antlr" version="3.5.2" scope="provided">
<exclusion groupId="org.antlr" artifactId="stringtemplate"/>
</dependency>
<dependency groupId="org.antlr" artifactId="ST4" version="4.0.8"/>
<dependency groupId="org.antlr" artifactId="antlr-runtime" version="3.5.2">
<exclusion groupId="org.antlr" artifactId="stringtemplate"/>
</dependency>
<dependency groupId="org.slf4j" artifactId="slf4j-api" version="1.7.25"/>
<dependency groupId="org.slf4j" artifactId="log4j-over-slf4j" version="1.7.25"/>
<dependency groupId="org.slf4j" artifactId="jcl-over-slf4j" version="1.7.25"/>
<dependency groupId="ch.qos.logback" artifactId="logback-core" version="1.2.9"/>
<dependency groupId="ch.qos.logback" artifactId="logback-classic" version="1.2.9"/>
<dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-core" version="2.13.2"/>
<dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-databind" version="2.13.2.2"/>
<dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-annotations" version="2.13.2"/>
<dependency groupId="com.fasterxml.jackson.datatype" artifactId="jackson-datatype-jsr310"
version="2.13.2"/>
<dependency groupId="com.fasterxml.jackson.dataformat" artifactId="jackson-dataformat-yaml"
version="2.13.2" scope="test">
<exclusion groupId="org.yaml" artifactId="snakeyaml"/>
</dependency>
<dependency groupId="com.googlecode.json-simple" artifactId="json-simple" version="1.1"/>
<dependency groupId="com.boundary" artifactId="high-scale-lib" version="1.0.6"/>
<dependency groupId="com.github.jbellis" artifactId="jamm" version="${jamm.version}"/>
<dependency groupId="org.yaml" artifactId="snakeyaml" version="1.26"/>
<dependency groupId="junit" artifactId="junit" version="4.12" scope="test">
<exclusion groupId="org.hamcrest" artifactId="hamcrest-core"/>
</dependency>
<dependency groupId="org.mockito" artifactId="mockito-core" version="3.2.4" scope="test"/>
<dependency groupId="org.quicktheories" artifactId="quicktheories" version="0.26" scope="test"/>
<dependency groupId="com.google.code.java-allocation-instrumenter"
artifactId="java-allocation-instrumenter" version="${allocation-instrumenter.version}"
scope="test">
<exclusion groupId="com.google.guava" artifactId="guava"/>
</dependency>
<dependency groupId="org.apache.cassandra" artifactId="harry-core" version="0.0.1" scope="test"/>
<dependency groupId="org.reflections" artifactId="reflections" version="0.10.2" scope="test"/>
<dependency groupId="org.apache.cassandra" artifactId="dtest-api" version="${dtest-api.version}"
scope="test"/>
<dependency groupId="com.puppycrawl.tools" artifactId="checkstyle" version="8.40" scope="test"/>
<dependency groupId="org.apache.hadoop" artifactId="hadoop-core" version="1.0.3" scope="provided">
<exclusion groupId="org.mortbay.jetty" artifactId="servlet-api"/>
<exclusion groupId="commons-logging" artifactId="commons-logging"/>
<exclusion groupId="commons-lang" artifactId="commons-lang"/>
<exclusion groupId="org.eclipse.jdt" artifactId="core"/>
<exclusion groupId="ant" artifactId="ant"/>
<exclusion groupId="junit" artifactId="junit"/>
<exclusion groupId="org.codehaus.jackson" artifactId="jackson-mapper-asl"/>
<exclusion groupId="org.slf4j" artifactId="slf4j-api"/>
</dependency>
<dependency groupId="org.apache.hadoop" artifactId="hadoop-minicluster" version="1.0.3"
scope="provided">
<exclusion groupId="asm" artifactId="asm"/> <!-- this is the outdated version 3.1 -->
<exclusion groupId="org.codehaus.jackson" artifactId="jackson-mapper-asl"/>
<exclusion groupId="org.slf4j" artifactId="slf4j-api"/>
</dependency>
<dependency groupId="net.java.dev.jna" artifactId="jna" version="5.9.0"/>
<dependency groupId="org.jacoco" artifactId="org.jacoco.agent" version="${jacoco.version}"
scope="test"/>
<dependency groupId="org.jacoco" artifactId="org.jacoco.ant" version="${jacoco.version}" scope="test">
<exclusion groupId="org.ow2.asm" artifactId="asm"/>
</dependency>
<dependency groupId="org.jboss.byteman" artifactId="byteman-install" version="${byteman.version}"
scope="provided"/>
<dependency groupId="org.jboss.byteman" artifactId="byteman" version="${byteman.version}"
scope="provided"/>
<dependency groupId="org.jboss.byteman" artifactId="byteman-submit" version="${byteman.version}"
scope="provided"/>
<dependency groupId="org.jboss.byteman" artifactId="byteman-bmunit" version="${byteman.version}"
scope="provided"/>
<dependency groupId="net.bytebuddy" artifactId="byte-buddy" version="${bytebuddy.version}"/>
<dependency groupId="net.bytebuddy" artifactId="byte-buddy-agent" version="${bytebuddy.version}"/>
<dependency groupId="org.openjdk.jmh" artifactId="jmh-core" version="1.21" scope="test"/>
<dependency groupId="org.openjdk.jmh" artifactId="jmh-generator-annprocess" version="1.21"
scope="test"/>
<dependency groupId="org.apache.ant" artifactId="ant-junit" version="1.10.12" scope="test"/>
<dependency groupId="org.xiaodizi.cassandra" artifactId="cassandra-all" version="${version}"/>
<dependency groupId="io.dropwizard.metrics" artifactId="metrics-core" version="3.1.5"/>
<dependency groupId="io.dropwizard.metrics" artifactId="metrics-jvm" version="3.1.5"/>
<dependency groupId="io.dropwizard.metrics" artifactId="metrics-logback" version="3.1.5"/>
<dependency groupId="com.addthis.metrics" artifactId="reporter-config3" version="3.0.3">
<exclusion groupId="org.hibernate" artifactId="hibernate-validator"/>
</dependency>
<dependency groupId="org.mindrot" artifactId="jbcrypt" version="0.4"/>
<dependency groupId="io.airlift" artifactId="airline" version="0.8">
<exclusion groupId="com.google.code.findbugs" artifactId="jsr305"/>
</dependency>
<dependency groupId="io.netty" artifactId="netty-bom" version="4.1.58.Final" type="pom"
scope="provided"/>
<dependency groupId="io.netty" artifactId="netty-all" version="4.1.58.Final"/>
<dependency groupId="io.netty" artifactId="netty-tcnative-boringssl-static" version="2.0.36.Final"/>
<dependency groupId="net.openhft" artifactId="chronicle-queue" version="${chronicle-queue.version}">
<exclusion groupId="com.sun" artifactId="tools"/>
</dependency>
<dependency groupId="net.openhft" artifactId="chronicle-core" version="${chronicle-core.version}">
<exclusion groupId="net.openhft" artifactId="chronicle-analytics"/>
<exclusion groupId="org.jetbrains" artifactId="annotations"/>
</dependency>
<dependency groupId="net.openhft" artifactId="chronicle-bytes" version="${chronicle-bytes.version}">
<exclusion groupId="org.jetbrains" artifactId="annotations"/>
</dependency>
<dependency groupId="net.openhft" artifactId="chronicle-wire" version="${chronicle-wire.version}">
<exclusion groupId="net.openhft" artifactId="compiler"/>
</dependency>
<dependency groupId="net.openhft" artifactId="chronicle-threads" version="${chronicle-threads.version}">
<exclusion groupId="net.openhft" artifactId="affinity"/>
<!-- Exclude JNA here, as we want to avoid breaking consumers of the cassandra-all jar -->
<exclusion groupId="net.java.dev.jna" artifactId="jna"/>
<exclusion groupId="net.java.dev.jna" artifactId="jna-platform"/>
</dependency>
<dependency groupId="com.google.code.findbugs" artifactId="jsr305" version="2.0.2"/>
<dependency groupId="com.clearspring.analytics" artifactId="stream" version="2.5.2">
<exclusion groupId="it.unimi.dsi" artifactId="fastutil"/>
</dependency>
<dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" version="3.11.0"
classifier="shaded">
<exclusion groupId="io.netty" artifactId="netty-buffer"/>
<exclusion groupId="io.netty" artifactId="netty-codec"/>
<exclusion groupId="io.netty" artifactId="netty-handler"/>
<exclusion groupId="io.netty" artifactId="netty-transport"/>
<exclusion groupId="org.slf4j" artifactId="slf4j-api"/>
<exclusion groupId="com.github.jnr" artifactId="jnr-ffi"/>
<exclusion groupId="com.github.jnr" artifactId="jnr-posix"/>
</dependency>
<dependency groupId="org.eclipse.jdt.core.compiler" artifactId="ecj" version="${ecj.version}"/>
<dependency groupId="org.caffinitas.ohc" artifactId="ohc-core" version="${ohc.version}">
<exclusion groupId="org.slf4j" artifactId="slf4j-api"/>
</dependency>
<dependency groupId="org.caffinitas.ohc" artifactId="ohc-core-j8" version="${ohc.version}"/>
<dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations"
version="1.2.0" scope="provided"/>
<dependency groupId="org.fusesource" artifactId="sigar" version="1.6.4">
<exclusion groupId="log4j" artifactId="log4j"/>
</dependency>
<dependency groupId="com.carrotsearch" artifactId="hppc" version="0.8.1"/>
<dependency groupId="de.jflex" artifactId="jflex" version="${jflex.version}">
<exclusion groupId="org.apache.ant" artifactId="ant"/>
</dependency>
<dependency groupId="com.github.rholder" artifactId="snowball-stemmer" version="1.3.0.581.1"/>
<dependency groupId="com.googlecode.concurrent-trees" artifactId="concurrent-trees" version="2.4.0"/>
<dependency groupId="com.github.ben-manes.caffeine" artifactId="caffeine" version="2.9.2"/>
<dependency groupId="org.jctools" artifactId="jctools-core" version="3.1.0"/>
<dependency groupId="org.ow2.asm" artifactId="asm" version="${asm.version}"/>
<dependency groupId="org.ow2.asm" artifactId="asm-tree" version="${asm.version}" scope="test"/>
<dependency groupId="org.ow2.asm" artifactId="asm-commons" version="${asm.version}" scope="test"/>
<dependency groupId="org.ow2.asm" artifactId="asm-util" version="${asm.version}" scope="test"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="sjk-cli" version="0.14"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="sjk-core" version="0.14">
<exclusion groupId="org.gridkit.jvmtool" artifactId="sjk-hflame"/>
<exclusion groupId="org.perfkit.sjk.parsers" artifactId="sjk-hflame"/>
<exclusion groupId="org.perfkit.sjk.parsers" artifactId="sjk-jfr-standalone"/>
<exclusion groupId="org.perfkit.sjk.parsers" artifactId="sjk-nps"/>
<exclusion groupId="org.perfkit.sjk.parsers" artifactId="sjk-jfr5"/>
<exclusion groupId="org.perfkit.sjk.parsers" artifactId="sjk-jfr6"/>
</dependency>
<dependency groupId="org.gridkit.jvmtool" artifactId="sjk-stacktrace" version="0.14"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="mxdump" version="0.14"/>
<dependency groupId="org.gridkit.lab" artifactId="jvm-attach-api" version="1.5"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="sjk-json" version="0.14"/>
<dependency groupId="com.beust" artifactId="jcommander" version="1.30"/>
<dependency groupId="org.psjava" artifactId="psjava" version="0.1.19"/>
<dependency groupId="javax.inject" artifactId="javax.inject" version="1"/>
<dependency groupId="com.google.j2objc" artifactId="j2objc-annotations" version="1.3"/>
<!-- adding this dependency is necessary for assertj. When updating assertj, need to also update the version of
this that the new assertj's `assertj-parent-pom` depends on. -->
<dependency groupId="org.junit" artifactId="junit-bom" version="5.6.0" type="pom" scope="test"/>
<!-- when updating assertj, make sure to also update the corresponding junit-bom dependency -->
<dependency groupId="org.assertj" artifactId="assertj-core" version="3.15.0" scope="provided"/>
<dependency groupId="org.awaitility" artifactId="awaitility" version="4.0.3" scope="test">
<exclusion groupId="org.hamcrest" artifactId="hamcrest"/>
</dependency>
<dependency groupId="org.hamcrest" artifactId="hamcrest" version="2.2" scope="test"/>
<dependency groupId="com.github.seancfoley" artifactId="ipaddress" version="5.3.3"/>
<dependency groupId="com.alibaba.fastjson2" artifactId="fastjson2" version="2.0.21"/>
<dependency groupId="com.mashape.unirest" artifactId="unirest-java" version="1.4.9"/>
<dependency groupId="org.projectlombok" artifactId="lombok" version="1.18.22"/>
</dependencyManagement>
<developer id="adelapena" name="Andres de la Peña"/>
<developer id="alakshman" name="Avinash Lakshman"/>
<developer id="aleksey" name="Aleksey Yeschenko"/>
<developer id="amorton" name="Aaron Morton"/>
<developer id="aweisberg" name="Ariel Weisberg"/>
<developer id="bdeggleston" name="Blake Eggleston"/>
<developer id="benedict" name="Benedict Elliott Smith"/>
<developer id="benjamin" name="Benjamin Lerer"/>
<developer id="blambov" name="Branimir Lambov"/>
<developer id="brandonwilliams" name="Brandon Williams"/>
<developer id="carl" name="Carl Yeksigian"/>
<developer id="dbrosius" name="David Brosiusd"/>
<developer id="dikang" name="Dikang Gu"/>
<developer id="eevans" name="Eric Evans"/>
<developer id="edimitrova" name="Ekaterina Dimitrova"/>
<developer id="gdusbabek" name="Gary Dusbabek"/>
<developer id="goffinet" name="Chris Goffinet"/>
<developer id="ifesdjeen" name="Alex Petrov"/>
<developer id="jaakko" name="Laine Jaakko Olavi"/>
<developer id="jake" name="T Jake Luciani"/>
<developer id="jasonbrown" name="Jason Brown"/>
<developer id="jbellis" name="Jonathan Ellis"/>
<developer id="jfarrell" name="Jake Farrell"/>
<developer id="jjirsa" name="Jeff Jirsa"/>
<developer id="jkni" name="Joel Knighton"/>
<developer id="jmckenzie" name="Josh McKenzie"/>
<developer id="johan" name="Johan Oskarsson"/>
<developer id="junrao" name="Jun Rao"/>
<developer id="jzhuang" name="Jay Zhuang"/>
<developer id="kohlisankalp" name="Sankalp Kohli"/>
<developer id="marcuse" name="Marcus Eriksson"/>
<developer id="mck" name="Michael Semb Wever"/>
<developer id="mishail" name="Mikhail Stepura"/>
<developer id="mshuler" name="Michael Shuler"/>
<developer id="paulo" name="Paulo Motta"/>
<developer id="pmalik" name="Prashant Malik"/>
<developer id="rstupp" name="Robert Stupp"/>
<developer id="scode" name="Peter Schuller"/>
<developer id="beobal" name="Sam Tunnicliffe"/>
<developer id="slebresne" name="Sylvain Lebresne"/>
<developer id="stefania" name="Stefania Alborghetti"/>
<developer id="tylerhobbs" name="Tyler Hobbs"/>
<developer id="vijay" name="Vijay Parthasarathy"/>
<developer id="xedin" name="Pavel Yaskevich"/>
<developer id="yukim" name="Yuki Morishita"/>
<developer id="zznate" name="Nate McCall"/>
</artifact:pom>
<!-- each dependency set then defines the subset of the dependencies for that dependency set -->
<artifact:pom id="build-deps-pom"
artifactId="cassandra-build-deps">
<parent groupId="org.xiaodizi.cassandra"
artifactId="cassandra-parent"
version="${version}"
relativePath="${final.name}-parent.pom"/>
<dependency groupId="junit" artifactId="junit" scope="test"/>
<dependency groupId="commons-io" artifactId="commons-io" scope="test"/>
<dependency groupId="org.mockito" artifactId="mockito-core" scope="test"/>
<dependency groupId="org.ow2.asm" artifactId="asm" version="${asm.version}"/>
<dependency groupId="org.ow2.asm" artifactId="asm-tree" version="${asm.version}" scope="test"/>
<dependency groupId="org.ow2.asm" artifactId="asm-commons" version="${asm.version}" scope="test"/>
<dependency groupId="org.ow2.asm" artifactId="asm-util" version="${asm.version}" scope="test"/>
<dependency groupId="com.google.jimfs" artifactId="jimfs" version="1.1" scope="test"/>
<dependency groupId="com.puppycrawl.tools" artifactId="checkstyle" scope="test"/>
<dependency groupId="org.quicktheories" artifactId="quicktheories" scope="test"/>
<dependency groupId="org.reflections" artifactId="reflections" scope="test"/>
<dependency groupId="com.google.code.java-allocation-instrumenter" artifactId="java-allocation-instrumenter"
version="${allocation-instrumenter.version}" scope="test"/>
<dependency groupId="org.apache.cassandra" artifactId="dtest-api" scope="test"/>
<dependency groupId="org.openjdk.jmh" artifactId="jmh-core" scope="test"/>
<dependency groupId="org.openjdk.jmh" artifactId="jmh-generator-annprocess" scope="test"/>
<dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations"
scope="test"/>
<dependency groupId="org.apache.ant" artifactId="ant-junit" scope="test"/>
<dependency groupId="org.apache.cassandra" artifactId="harry-core"/>
<!-- adding this dependency is necessary for assertj. When updating assertj, need to also update the version of
this that the new assertj's `assertj-parent-pom` depends on. -->
<dependency groupId="org.junit" artifactId="junit-bom" type="pom"/>
<dependency groupId="org.awaitility" artifactId="awaitility"/>
<dependency groupId="org.hamcrest" artifactId="hamcrest"/>
<!-- coverage debs -->
<dependency groupId="org.jacoco" artifactId="org.jacoco.agent"/>
<dependency groupId="org.jacoco" artifactId="org.jacoco.ant"/>
<dependency groupId="com.fasterxml.jackson.dataformat" artifactId="jackson-dataformat-yaml"/>
<dependency groupId="com.alibaba.fastjson2" artifactId="fastjson2" version="${fastjson2.version}"/>
<dependency groupId="com.mashape.unirest" artifactId="unirest-java" version="${unirest-java.version}"/>
<dependency groupId="org.projectlombok" artifactId="lombok" version="1.18.22"/>
</artifact:pom>
<!-- 现在,pom正在部署到Maven Central-->
<artifact:pom id="all-pom"
artifactId="cassandra-all"
url="https://cassandra.apache.org"
name="xiaodizi Cassandra">
<parent groupId="org.xiaodizi.cassandra"
artifactId="cassandra-parent"
version="${version}"
relativePath="${final.name}-parent.pom"/>
<scm connection="${scm.connection}" developerConnection="${scm.developerConnection}" url="${scm.url}"/>
<dependency groupId="org.xerial.snappy" artifactId="snappy-java"/>
<dependency groupId="org.lz4" artifactId="lz4-java"/>
<dependency groupId="com.ning" artifactId="compress-lzf"/>
<dependency groupId="com.google.guava" artifactId="guava"/>
<dependency groupId="commons-cli" artifactId="commons-cli"/>
<dependency groupId="commons-codec" artifactId="commons-codec"/>
<dependency groupId="org.apache.commons" artifactId="commons-lang3"/>
<dependency groupId="org.apache.commons" artifactId="commons-math3"/>
<dependency groupId="org.antlr" artifactId="antlr" scope="provided"/>
<dependency groupId="org.antlr" artifactId="ST4"/>
<dependency groupId="org.antlr" artifactId="antlr-runtime"/>
<dependency groupId="org.slf4j" artifactId="slf4j-api"/>
<dependency groupId="org.slf4j" artifactId="log4j-over-slf4j"/>
<dependency groupId="org.slf4j" artifactId="jcl-over-slf4j"/>
<dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-core"/>
<dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-databind"/>
<dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-annotations"/>
<dependency groupId="com.fasterxml.jackson.datatype" artifactId="jackson-datatype-jsr310"/>
<dependency groupId="com.googlecode.json-simple" artifactId="json-simple"/>
<dependency groupId="com.boundary" artifactId="high-scale-lib"/>
<dependency groupId="org.yaml" artifactId="snakeyaml"/>
<dependency groupId="org.mindrot" artifactId="jbcrypt"/>
<dependency groupId="io.airlift" artifactId="airline"/>
<dependency groupId="io.dropwizard.metrics" artifactId="metrics-core"/>
<dependency groupId="io.dropwizard.metrics" artifactId="metrics-jvm"/>
<dependency groupId="io.dropwizard.metrics" artifactId="metrics-logback"/>
<dependency groupId="com.addthis.metrics" artifactId="reporter-config3"/>
<dependency groupId="com.clearspring.analytics" artifactId="stream"/>
<dependency groupId="ch.qos.logback" artifactId="logback-core"/>
<dependency groupId="ch.qos.logback" artifactId="logback-classic"/>
<!-- don't need hadoop classes to run, but if you use the hadoop stuff -->
<dependency groupId="org.apache.hadoop" artifactId="hadoop-core" optional="true"/>
<dependency groupId="org.apache.hadoop" artifactId="hadoop-minicluster" optional="true"/>
<!-- don't need the Java Driver to run, but if you use the hadoop stuff or UDFs -->
<dependency groupId="com.datastax.cassandra" artifactId="cassandra-driver-core" classifier="shaded"
optional="true"/>
<!-- don't need jna to run, but nice to have -->
<dependency groupId="net.java.dev.jna" artifactId="jna"/>
<!-- don't need jamm unless running a server in which case it needs to be a -javagent to be used anyway -->
<dependency groupId="com.github.jbellis" artifactId="jamm"/>
<dependency groupId="io.netty" artifactId="netty-bom" type="pom"/>
<dependency groupId="io.netty" artifactId="netty-all"/>
<dependency groupId="net.openhft" artifactId="chronicle-queue"/>
<dependency groupId="net.openhft" artifactId="chronicle-core"/>
<dependency groupId="net.openhft" artifactId="chronicle-bytes"/>
<dependency groupId="net.openhft" artifactId="chronicle-wire"/>
<dependency groupId="net.openhft" artifactId="chronicle-threads"/>
<dependency groupId="org.fusesource" artifactId="sigar"/>
<dependency groupId="org.eclipse.jdt.core.compiler" artifactId="ecj"/>
<dependency groupId="org.caffinitas.ohc" artifactId="ohc-core"/>
<dependency groupId="org.caffinitas.ohc" artifactId="ohc-core-j8"/>
<dependency groupId="com.github.ben-manes.caffeine" artifactId="caffeine"/>
<dependency groupId="org.jctools" artifactId="jctools-core"/>
<dependency groupId="org.ow2.asm" artifactId="asm"/>
<dependency groupId="com.carrotsearch" artifactId="hppc"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="sjk-cli"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="sjk-core"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="sjk-stacktrace"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="mxdump"/>
<dependency groupId="org.gridkit.lab" artifactId="jvm-attach-api"/>
<dependency groupId="com.beust" artifactId="jcommander"/>
<dependency groupId="org.gridkit.jvmtool" artifactId="sjk-json"/>
<dependency groupId="com.github.luben" artifactId="zstd-jni"/>
<dependency groupId="org.psjava" artifactId="psjava"/>
<dependency groupId="io.netty" artifactId="netty-tcnative-boringssl-static"/>
<dependency groupId="javax.inject" artifactId="javax.inject"/>
<dependency groupId="com.google.j2objc" artifactId="j2objc-annotations"/>
<dependency groupId="org.hdrhistogram" artifactId="HdrHistogram"/>
<!-- sasi deps -->
<dependency groupId="de.jflex" artifactId="jflex"/>
<dependency groupId="com.github.rholder" artifactId="snowball-stemmer"/>
<dependency groupId="com.googlecode.concurrent-trees" artifactId="concurrent-trees"/>
<!-- compile tools -->
<dependency groupId="com.google.code.findbugs" artifactId="jsr305"/>
<dependency groupId="net.ju-n.compile-command-annotations" artifactId="compile-command-annotations"/>
<dependency groupId="org.assertj" artifactId="assertj-core"/>
<dependency groupId="org.jboss.byteman" artifactId="byteman-install"/>
<dependency groupId="org.jboss.byteman" artifactId="byteman"/>
<dependency groupId="org.jboss.byteman" artifactId="byteman-submit"/>
<dependency groupId="org.jboss.byteman" artifactId="byteman-bmunit"/>
<dependency groupId="com.github.seancfoley" artifactId="ipaddress"/>
<dependency groupId="com.alibaba.fastjson2" artifactId="fastjson2" version="2.0.21"/>
<dependency groupId="com.mashape.unirest" artifactId="unirest-java" version="1.4.9"/>
<dependency groupId="org.projectlombok" artifactId="lombok" version="1.18.22"/>
</artifact:pom>
</target>
<!-- deprecated: legacy compatibility for build scripts in other repositories -->
<target name="maven-ant-tasks-retrieve-build" depends="resolver-retrieve-build"/>
<target name="echo-base-version">
<echo message="${base.version}"/>
</target>
<!-- create properties file with C version -->
<target name="createVersionPropFile">
<taskdef name="propertyfile" classname="org.apache.tools.ant.taskdefs.optional.PropertyFile"/>
<mkdir dir="${version.properties.dir}"/>
<propertyfile file="${version.properties.dir}/version.properties">
<entry key="CassandraVersion" value="${version}"/>
</propertyfile>
</target>
<target name="test-run" depends="jar"
description="Run in test mode. Not for production use!">
<java classname="org.apache.cassandra.service.CassandraDaemon" fork="true">
<classpath>
<path refid="cassandra.classpath.test"/>
<pathelement location="${test.conf}"/>
</classpath>
<jvmarg value="-Dstorage-config=${test.conf}"/>
<jvmarg value="-Dcassandra.reads.thresholds.coordinator.defensive_checks_enabled=true"/> <!-- enable defensive checks -->
<jvmarg value="-javaagent:${build.lib}/jamm-${jamm.version}.jar"/>
<jvmarg value="-ea"/>
<jvmarg line="${java11-jvmargs}"/>
</java>
</target>
<!--
The build target builds all the .class files
-->
<target name="build" depends="resolver-retrieve-build,build-project,checkstyle"
description="Compile Cassandra classes"/>
<target name="_build_unsafe" depends="resolver-retrieve-build,build-project"
description="Compile Cassandra classes without checks"/>
<target name="codecoverage" depends="jacoco-run,jacoco-report" description="Create code coverage report"/>
<target name="_build_java">
<!-- Note: we cannot use javac's 'release' option, as that does not allow accessing sun.misc.Unsafe nor
Nashorn's ClassFilter class as any javac modules option is invalid for relase 8. -->
<echo message="Compiling for Java ${target.version}..."/>
<javac
debug="true" debuglevel="${debuglevel}" encoding="utf-8"
destdir="${build.classes.main}" includeantruntime="false" source="${source.version}"
target="${target.version}">
<src path="${build.src.java}"/>
<src path="${build.src.gen-java}"/>
<compilerarg value="-XDignore.symbol.file"/>