Source

Cassandra / 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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
 ~ 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="apache-cassandra"
         xmlns:artifact="antlib:org.apache.maven.artifact.ant">
    <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="1.2.0-rc1"/>
    <property name="scm.connection" value="scm:git://git.apache.org/cassandra.git"/>
    <property name="scm.developerConnection" value="scm:git://git.apache.org/cassandra.git"/>
    <property name="scm.url" value="http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=tree"/>

    <!-- 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.resources" value="${basedir}/src/resources"/>
    <property name="avro.src" value="${basedir}/src/avro"/>
    <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="build.classes.thrift" value="${build.classes}/thrift" />
    <property name="javadoc.dir" value="${build.dir}/javadoc"/>
    <property name="javadoc.jars.dir" value="${build.dir}/javadocs"/>
    <property name="interface.dir" value="${basedir}/interface"/>
    <property name="interface.thrift.dir" value="${interface.dir}/thrift"/>
    <property name="interface.thrift.gen-java" value="${interface.thrift.dir}/gen-java"/>
    <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.unit.src" value="${test.dir}/unit"/>
    <property name="test.long.src" value="${test.dir}/long"/>
    <property name="dist.dir" value="${build.dir}/dist"/>
    <condition property="version" value="${base.version}">
      <isset property="release"/>
    </condition>
    <property name="version" value="${base.version}-SNAPSHOT"/>
    <property name="version.properties.dir"
              value="${build.classes.main}/org/apache/cassandra/config/" />
    <property name="final.name" value="${ant.project.name}-${version}"/>
 
    <!-- 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="${user.home}/.m2/repository/org/apache/maven/maven-ant-tasks"/>
    <property name="maven-ant-tasks.url"
              value="http://repo2.maven.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="60000" />
    <property name="test.long.timeout" value="600000" />

    <!-- http://cobertura.sourceforge.net/ -->
    <property name="cobertura.version" value="1.9.4.1"/>
    <property name="cobertura.build.dir" value="${build.dir}/cobertura"/>
    <property name="cobertura.report.dir" value="${cobertura.build.dir}/report"/>
    <property name="cobertura.classes.dir" value="${cobertura.build.dir}/classes"/>
    <property name="cobertura.datafile" value="${cobertura.build.dir}/cobertura.ser"/>

    <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>

    <tstamp>
      <format property="YEAR" pattern="yyyy"/>
    </tstamp>

    <!--
         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="${cobertura.classes.dir}"/>
        <pathelement location="${build.classes.main}" />
        <pathelement location="${build.classes.thrift}" />
        <fileset dir="${build.lib}">
          <include name="**/*.jar" />
        </fileset>
        <fileset dir="${build.dir.lib}">
          <include name="**/*.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 &amp;copy; ${YEAR} The Apache Software Foundation"
        useexternalfile="yes"
        maxmemory="256m">
        <filesets/>
      </javadoc>
    </sequential>
  </macrodef>

    <!--
        Setup the output directories.
    -->
    <target name="init">
        <fail unless="is.source.artifact"
            message="Not a source artifact, stopping here." />
        <mkdir dir="${build.classes.main}"/>
        <mkdir dir="${build.classes.thrift}"/>
        <mkdir dir="${test.lib}"/>
        <mkdir dir="${test.classes}"/>
        <mkdir dir="${build.src.gen-java}"/>
    </target>

    <target name="clean" description="Remove all locally created artifacts">
        <delete dir="${build.test.dir}" />
        <delete dir="${build.classes}" />
        <delete dir="${cobertura.classes.dir}" />
        <delete dir="${build.src.gen-java}" />
        <delete file="${build.dir}/internode.avpr" />
    </target>
    <target depends="clean" name="cleanall"/>

    <target name="realclean" depends="clean">
        <delete dir="${build.dir}" />
    </target>

    <!--
       This generates the CLI grammar files from Cli.g
    -->
    <target name="check-gen-cli-grammar">
        <uptodate property="cliUpToDate"
                srcfile="${build.src.java}/org/apache/cassandra/cli/Cli.g"
                targetfile="${build.src.gen-java}/org/apache/cassandra/cli/Cli.tokens"/>
    </target>

    <target name="gen-cli-grammar" depends="check-gen-cli-grammar" unless="cliUpToDate">
      <echo>Building Grammar ${build.src.java}/org/apache/cassandra/cli/Cli.g  ....</echo>
      <java classname="org.antlr.Tool"
            classpath="${build.lib}/antlr-3.2.jar"
            fork="true"
            failonerror="true">
         <arg value="${build.src.java}/org/apache/cassandra/cli/Cli.g" />
         <arg value="-fo" />
         <arg value="${build.src.gen-java}/org/apache/cassandra/cli/" />
      </java>
    </target>

    <!--
       This generates the CQL grammar files from Cql.g
    -->
    <target name="check-gen-cql2-grammar">
        <uptodate property="cql2current"
                srcfile="${build.src.java}/org/apache/cassandra/cql/Cql.g"
                targetfile="${build.src.gen-java}/org/apache/cassandra/cql/Cql.tokens"/>
    </target>
    <target name="check-gen-cql3-grammar">
        <uptodate property="cql3current"
                srcfile="${build.src.java}/org/apache/cassandra/cql3/Cql.g"
                targetfile="${build.src.gen-java}/org/apache/cassandra/cql3/Cql.tokens"/>
    </target>
 
    <target name="gen-cql2-grammar" depends="check-gen-cql2-grammar" unless="cql2current">
      <echo>Building Grammar ${build.src.java}/org/apache/cassandra/cql/Cql.g  ...</echo>
      <java classname="org.antlr.Tool"
            classpath="${build.lib}/antlr-3.2.jar"
            fork="true"
            failonerror="true">
         <arg value="${build.src.java}/org/apache/cassandra/cql/Cql.g" />
         <arg value="-fo" />
         <arg value="${build.src.gen-java}/org/apache/cassandra/cql/" />
      </java>
    </target>
    <target name="gen-cql3-grammar" depends="check-gen-cql3-grammar" unless="cql3current">
      <echo>Building Grammar ${build.src.java}/org/apache/cassandra/cql3/Cql.g  ...</echo>
      <java classname="org.antlr.Tool"
            classpath="${build.lib}/antlr-3.2.jar"
            fork="true"
            failonerror="true">
         <arg value="${build.src.java}/org/apache/cassandra/cql3/Cql.g" />
         <arg value="-fo" />
         <arg value="${build.src.gen-java}/org/apache/cassandra/cql3/" />
      </java>
    </target>

    <target name="generate-cql-html" depends="maven-ant-tasks-init" description="Generate HTML from textile source">
        <artifact:dependencies pathId="wikitext.classpath">
            <dependency groupId="com.datastax.wikitext" artifactId="wikitext-core-ant" version="1.3"/>
            <dependency groupId="org.fusesource.wikitext" artifactId="textile-core" version="1.3"/>
        </artifact:dependencies>
        <taskdef classpathref="wikitext.classpath" resource="wikitexttasks.properties" />
        <wikitext-to-html markupLanguage="Textile">
            <fileset dir="${basedir}">
                <include name="doc/cql/*.textile"/>
            </fileset>
            <fileset dir="${basedir}">
                <include name="doc/cql3/*.textile"/>
            </fileset>
        </wikitext-to-html>
    </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"
            description="Fetch Maven ANT Tasks from Maven Local Repository">
      <mkdir dir="${build.dir}" />
      <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="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>
      <mkdir dir="${build.dir}" />
      <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" />
    </target>

    <target name="maven-ant-tasks-init" depends="maven-ant-tasks-download" unless="maven-ant-tasks.initialized"
            description="Initialize Maven ANT Tasks">
      <mkdir dir="${build.dir.lib}"/>
      <typedef uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" />

      <!-- define the remote repositories we use -->
      <artifact:remoteRepository id="central"   url="${artifact.remoteRepository.central}"/>
      <artifact:remoteRepository id="java.net2" url="${artifact.remoteRepository.java.net2}"/>
      <artifact:remoteRepository id="apache"    url="${artifact.remoteRepository.apache}"/>

      <macrodef name="install">
        <attribute name="pomFile"/>
        <attribute name="file"/>
        <attribute name="classifier" default=""/>
        <attribute name="packaging" default="jar"/>
        <sequential>
          <artifact:mvn mavenVersion="${maven.version}" fork="true" failonerror="true">
            <arg value="org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file" />
            <arg value="-DpomFile=@{pomFile}" />
            <arg value="-Dfile=@{file}" />
            <arg value="-Dclassifier=@{classifier}" />
            <arg value="-Dpackaging=@{packaging}" />
          </artifact:mvn>
        </sequential>
      </macrodef>

      <macrodef name="deploy">
        <attribute name="pomFile"/>
        <attribute name="file"/>
        <attribute name="classifier" default=""/>
        <attribute name="packaging" default="jar"/>
        <sequential>
          <artifact:mvn mavenVersion="${maven.version}" fork="true" failonerror="true">
            <jvmarg value="-Xmx512m"/>
            <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.4:sign-and-deploy-file" />
            <arg value="-DretryFailedDeploymentCount=5" />
            <arg value="-Durl=${maven-repository-url}" />
            <arg value="-DrepositoryId=${maven-repository-id}" />
            <arg value="-DpomFile=@{pomFile}" />
            <arg value="-Dfile=@{file}" />
            <arg value="-Dclassifier=@{classifier}" />
            <arg value="-Dpackaging=@{packaging}" />
            <arg value="-Papache-release" />
          </artifact:mvn>
        </sequential>
      </macrodef>

      <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 -->
    <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="http://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.">
        <license name="The Apache Software License, Version 2.0" url="http://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.0.4.1"/>
          <dependency groupId="com.ning" artifactId="compress-lzf" version="0.8.4"/>
          <dependency groupId="com.google.guava" artifactId="guava" version="12.0"/>
          <dependency groupId="commons-cli" artifactId="commons-cli" version="1.1"/>
          <dependency groupId="commons-codec" artifactId="commons-codec" version="1.2"/>
          <dependency groupId="commons-lang" artifactId="commons-lang" version="2.4"/>
          <dependency groupId="com.googlecode.concurrentlinkedhashmap" artifactId="concurrentlinkedhashmap-lru" version="1.3"/>
          <dependency groupId="org.antlr" artifactId="antlr" version="3.2"/>
          <dependency groupId="org.slf4j" artifactId="slf4j-api" version="1.7.2"/>
          <dependency groupId="org.slf4j" artifactId="slf4j-log4j12" version="1.7.2"/>
          <dependency groupId="org.codehaus.jackson" artifactId="jackson-core-asl" version="1.4.0"/>
          <dependency groupId="org.codehaus.jackson" artifactId="jackson-mapper-asl" version="1.4.0"/>
          <dependency groupId="jline" artifactId="jline" version="1.0">
            <exclusion groupId="junit" artifactId="junit"/>
          </dependency>
          <dependency groupId="com.googlecode.json-simple" artifactId="json-simple" version="1.1"/>
          <dependency groupId="com.github.stephenc.high-scale-lib" artifactId="high-scale-lib" version="1.1.2"/>
          <dependency groupId="com.github.stephenc" artifactId="jamm" version="0.2.5"/>
          <dependency groupId="org.yaml" artifactId="snakeyaml" version="1.6"/>
          <dependency groupId="org.apache.cassandra.deps" artifactId="avro" version="1.4.0-cassandra-1">
            <exclusion groupId="org.jboss.netty" artifactId="netty"/>
            <exclusion groupId="com.thoughtworks.paranamer" artifactId="paranamer"/>
            <exclusion groupId="com.thoughtworks.paranamer" artifactId="paranamer-ant"/>
            <exclusion groupId="org.apache.velocity" artifactId="velocity"/>
          </dependency>
          
          <dependency groupId="org.apache.thrift" artifactId="libthrift" version="0.7.0"/>

          <dependency groupId="com.thoughtworks.paranamer" artifactId="paranamer-ant" version="2.1"/>
          <dependency groupId="junit" artifactId="junit" version="4.6" />
          <dependency groupId="commons-logging" artifactId="commons-logging" version="1.1.1"/>
          <dependency groupId="org.apache.rat" artifactId="apache-rat" version="0.6">
             <exclusion groupId="commons-lang" artifactId="commons-lang"/>
          </dependency>
          <dependency groupId="org.apache.hadoop" artifactId="hadoop-core" version="1.0.3"/>
          <dependency groupId="org.apache.pig" artifactId="pig" version="0.10.0"/>
          <dependency groupId="net.sf.jopt-simple" artifactId="jopt-simple" version="3.2"/>
          <dependency groupId="net.java.dev.jna" artifactId="jna" version="3.2.7"/>

          <dependency groupId="net.sourceforge.cobertura" artifactId="cobertura" version="${cobertura.version}"/>

          <dependency groupId="org.apache.whirr" artifactId="whirr-core" version="0.4.0-incubating"/>
          <dependency groupId="org.apache.whirr" artifactId="whirr-cli" version="0.4.0-incubating"/>
          <dependency groupId="org.jclouds.provider" artifactId="aws-s3" version="1.0-beta-9b" />

          <dependency groupId="log4j" artifactId="log4j" version="1.2.16" />
          <dependency groupId="org.apache.cassandra" artifactId="cassandra-all" version="${version}" />
          <dependency groupId="org.apache.cassandra" artifactId="cassandra-thrift" version="${version}" />
          <dependency groupId="com.yammer.metrics" artifactId="metrics-core" version="2.0.3" />
          <dependency groupId="edu.stanford.ppl" artifactId="snaptree" version="0.1" />
        </dependencyManagement>
        <developer id="alakshman" name="Avinash Lakshman"/>
        <developer id="antelder" name="Anthony Elder"/>
        <developer id="brandonwilliams" name="Brandon Williams"/>
        <developer id="eevans" name="Eric Evans"/>
        <developer id="gdusbabek" name="Gary Dusbabek"/>
        <developer id="goffinet" name="Chris Goffinet"/>
        <developer id="jaakko" name="Laine Jaakko Olavi"/>
        <developer id="jake" name="T Jake Luciani"/>
        <developer id="jbellis" name="Jonathan Ellis"/>
        <developer id="johan" name="Johan Oskarsson"/>
        <developer id="junrao" name="Jun Rao"/>
        <developer id="mriou" name="Matthieu Riou"/>
        <developer id="pmalik" name="Prashant Malik"/>
        <developer id="slebresne" name="Sylvain Lebresne"/>
      </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.apache.cassandra"
                artifactId="cassandra-parent"
                version="${version}"/>
        <!-- FIXME: paranamer can be dropped after we're depending on avro
        (since it depends on them). -->
        <dependency groupId="com.thoughtworks.paranamer" artifactId="paranamer-ant"/>
        <dependency groupId="junit" artifactId="junit"/>
        <dependency groupId="commons-logging" artifactId="commons-logging"/>
        <dependency groupId="org.apache.rat" artifactId="apache-rat"/>
        <dependency groupId="org.apache.hadoop" artifactId="hadoop-core"/>
        <dependency groupId="org.apache.pig" artifactId="pig"/>
        <dependency groupId="net.sf.jopt-simple" artifactId="jopt-simple"/>

        <dependency groupId="net.java.dev.jna" artifactId="jna"/>
      </artifact:pom>

      <artifact:pom id="coverage-deps-pom"
                    artifactId="cassandra-coverage-deps">
        <parent groupId="org.apache.cassandra"
                artifactId="cassandra-parent"
                version="${version}"/>
        <dependency groupId="net.sourceforge.cobertura" artifactId="cobertura"/>
      </artifact:pom>

      <artifact:pom id="test-deps-pom"
                    artifactId="cassandra-test-deps">
        <parent groupId="org.apache.cassandra"
                artifactId="cassandra-parent"
                version="${version}"/>
        <dependency groupId="org.apache.whirr" artifactId="whirr-core"/>
        <dependency groupId="org.apache.whirr" artifactId="whirr-cli"/>
        <dependency groupId="org.jclouds.provider" artifactId="aws-s3"/>
      </artifact:pom>

      <!-- now the pom's for artifacts being deployed to Maven Central -->

      <artifact:pom id="all-pom"
                    artifactId="cassandra-all"
                    url="http://cassandra.apache.org"
                    name="Apache Cassandra">
        <parent groupId="org.apache.cassandra"
                artifactId="cassandra-parent"
                version="${version}"/>
        <scm connection="${scm.connection}" developerConnection="${scm.developerConnection}" url="${scm.url}"/>
        <dependency groupId="org.xerial.snappy" artifactId="snappy-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="commons-lang" artifactId="commons-lang"/>
        <dependency groupId="com.googlecode.concurrentlinkedhashmap" artifactId="concurrentlinkedhashmap-lru"/>
        <dependency groupId="org.antlr" artifactId="antlr"/>
        <dependency groupId="org.slf4j" artifactId="slf4j-api"/>
        <dependency groupId="org.apache.cassandra.deps" artifactId="avro"/>
        <dependency groupId="org.codehaus.jackson" artifactId="jackson-core-asl"/>
        <dependency groupId="org.codehaus.jackson" artifactId="jackson-mapper-asl"/>
        <dependency groupId="jline" artifactId="jline"/>
        <dependency groupId="com.googlecode.json-simple" artifactId="json-simple"/>
        <dependency groupId="com.github.stephenc.high-scale-lib" artifactId="high-scale-lib"/>
        <dependency groupId="org.yaml" artifactId="snakeyaml"/>
        <dependency groupId="edu.stanford.ppl" artifactId="snaptree"/>
        <dependency groupId="com.yammer.metrics" artifactId="metrics-core"/>
        
        <dependency groupId="log4j" artifactId="log4j"/>
        <!-- cassandra has a hard dependency on log4j, so force slf4j's log4j provider at runtime -->
        <dependency groupId="org.slf4j" artifactId="slf4j-log4j12" scope="runtime"/>

        <dependency groupId="org.apache.thrift" artifactId="libthrift"/>
        <dependency groupId="org.apache.cassandra" artifactId="cassandra-thrift"/>
        
        <!-- 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.pig" artifactId="pig" optional="true"/>

        <!-- don't need jna to run, but nice to have -->
        <dependency groupId="net.java.dev.jna" artifactId="jna" optional="true"/>
        
        <!-- 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.stephenc" artifactId="jamm"/>
      </artifact:pom>
      <artifact:pom id="thrift-pom"
                    artifactId="cassandra-thrift"
                    url="http://cassandra.apache.org"
                    name="Apache Cassandra">
        <parent groupId="org.apache.cassandra"
                artifactId="cassandra-parent"
                version="${version}"/>
        <scm connection="${scm.connection}" developerConnection="${scm.developerConnection}" url="${scm.url}"/>
        <dependency groupId="commons-lang" artifactId="commons-lang"/>
        <dependency groupId="org.slf4j" artifactId="slf4j-api"/>
        <dependency groupId="org.apache.thrift" artifactId="libthrift"/>
      </artifact:pom>
      <artifact:pom id="clientutil-pom"
                    artifactId="cassandra-clientutil"
                    url="http://cassandra.apache.org"
                    name="Apache Cassandra">
        <parent groupId="org.apache.cassandra"
                artifactId="cassandra-parent"
                version="${version}"/>
        <scm connection="${scm.connection}" developerConnection="${scm.developerConnection}" url="${scm.url}"/>
  <dependency groupId="com.google.guava" artifactId="guava"/>
      </artifact:pom>
      
      <artifact:pom id="dist-pom"
                    artifactId="apache-cassandra"
                    packaging="pom"
                    url="http://cassandra.apache.org"
                    name="Apache Cassandra">
        <parent groupId="org.apache.cassandra"
                artifactId="cassandra-parent"
                version="${version}"/>
        <scm connection="${scm.connection}" developerConnection="${scm.developerConnection}" url="${scm.url}"/>
      </artifact:pom>
    </target>

    <target name="maven-ant-tasks-retrieve-build" depends="maven-declare-dependencies">
      <artifact:dependencies pomRefId="build-deps-pom"
                             filesetId="build-dependency-jars" 
                             sourcesFilesetId="build-dependency-sources" 
                             cacheDependencyRefs="true" 
                             dependencyRefsBuildFile="${build.dir}/build-dependencies.xml">
          <remoteRepository refid="central"/>
          <remoteRepository refid="apache"/>
          <remoteRepository refid="java.net2"/>
      </artifact:dependencies>
      <artifact:dependencies pomRefId="coverage-deps-pom"
                             pathId="cobertura.classpath">
          <remoteRepository refid="central"/>
      </artifact:dependencies>

      <copy todir="${build.dir.lib}/jars">
          <fileset refid="build-dependency-jars"/>
          <mapper type="flatten"/>
      </copy>
      <copy todir="${build.dir.lib}/sources">
          <fileset refid="build-dependency-sources"/>
          <mapper type="flatten"/>
      </copy>
    </target>

    <target name="maven-ant-tasks-retrieve-test" depends="maven-ant-tasks-init">
      <artifact:dependencies pomRefId="test-deps-pom"
                             filesetId="test-dependency-jars"
                             sourcesFilesetId="test-dependency-sources" 
                             cacheDependencyRefs="true" 
                             dependencyRefsBuildFile="${build.dir}/test-dependencies.xml">
        <remoteRepository refid="apache"/>
        <remoteRepository refid="central"/>
        <remoteRepository refid="jclouds"/>
        <remoteRepository refid="oauth"/>
      </artifact:dependencies>
      <copy todir="${test.lib}/jars">
        <fileset refid="test-dependency-jars"/>
        <mapper type="flatten"/>
      </copy>
      <copy todir="${test.lib}/sources">
        <fileset refid="test-dependency-sources"/>
        <mapper type="flatten"/>
      </copy>
    </target>

    <!--
       Generate avro code
    -->
    <target name="check-avro-generate" depends="maven-ant-tasks-init">
      <taskdef name="avro-protocol" classname="org.apache.avro.specific.ProtocolTask">
        <classpath refid="cassandra.classpath" />
      </taskdef>
      <uptodate property="avroINProtoUpToDate" srcfile="${avro.src}/internode.genavro"
                targetfile="${build.dir}/internode.avpr" />
    </target>

    <target name="avro-generate"
            depends="avro-interface-generate-internode"
            description="Generates Java Avro classes for client and internal use." />
    
    <target name="avro-interface-generate-internode" unless="avroINProtoUpToDate"
            depends="init,check-avro-generate,maven-ant-tasks-retrieve-build">
      <avromacro protocolname="internode" inputfile="${avro.src}/internode.genavro"
                 jsondir="${build.dir}" outputdir="${build.src}"/>
    </target>

    <macrodef name="avromacro">
      <attribute name="protocolname" />
      <attribute name="inputfile" />
      <attribute name="jsondir" />
      <attribute name="outputdir" />
      <sequential>
        <echo message="Generating Avro @{protocolname} code..." />
        <mkdir dir="@{jsondir}" />
        <!-- Generate json schema from genavro IDL -->
        <java classname="org.apache.avro.tool.Main" fork="true">
          <classpath refid="cassandra.classpath" />
          <arg value="idl" />
          <arg value="@{inputfile}" />
          <arg value="@{jsondir}/@{protocolname}.avpr" />
        </java>

        <!-- Generate java code from JSON protocol schema -->
        <avro-protocol destdir="@{outputdir}/gen-java">
            <fileset file="@{jsondir}/@{protocolname}.avpr" />
        </avro-protocol>
      </sequential>
    </macrodef>


    <!--
       Generate thrift code.  We have targets to build java because
       Cassandra depends on it, and python because that is what the system
       tests run.
    -->
    <target name="gen-thrift-java" depends="rat-init" description="Generate Thrift Java artifacts">
      <echo>Generating Thrift Java code from ${basedir}/interface/cassandra.thrift ....</echo>
      <exec executable="thrift" dir="${basedir}/interface" failonerror="true">
        <arg line="--gen java:hashcode" />
        <arg line="-o ${interface.thrift.dir}" />
        <arg line="cassandra.thrift" />
      </exec>
      <java classname="org.apache.rat.Report" fork="true"
            output="${build.dir}/rat-report.log">
        <classpath refid="rat.classpath" />
        <arg value="-a" />
        <arg value="--force" />
        <arg value="interface/thrift" />
      </java>
    </target>
    <target name="gen-thrift-py" description="Generate Thrift Python artifacts">
      <echo>Generating Thrift Python code from ${basedir}/interface/cassandra.thrift ....</echo>
      <exec executable="thrift" dir="${basedir}/interface" failonerror="true">
        <arg line="--gen py" />
        <arg line="-o ${interface.thrift.dir}" />
        <arg line="cassandra.thrift" />
      </exec>
      <exec executable="thrift" dir="${basedir}/interface" failonerror="true">
        <arg line="--gen py:twisted" />
        <arg line="-o ${interface.thrift.dir}" />
        <arg line="cassandra.thrift" />
      </exec>
    </target>

    <!-- create properties file with C version -->
    <target name="createVersionPropFile">
      <taskdef name="propertyfile" classname="org.apache.tools.ant.taskdefs.optional.PropertyFile"/>
      <propertyfile file="${version.properties.dir}/version.properties">
        <entry key="CassandraVersion" value="${version}"/>
      </propertyfile>
    </target>

    <target name="test-run" depends="build"
            description="Run in test mode.  Not for production use!">
      <java classname="org.apache.cassandra.service.CassandraDaemon" fork="true">
        <classpath>
          <path refid="cassandra.classpath"/>  
          <pathelement location="${test.conf}"/>
        </classpath>
        <jvmarg value="-Dstorage-config=${test.conf}"/>
        <jvmarg value="-javaagent:${basedir}/lib/jamm-0.2.5.jar" />
        <jvmarg value="-ea"/>
      </java>
    </target>

    <!--
        The build target builds all the .class files
    -->
    <target name="build"
        depends="maven-ant-tasks-retrieve-build,avro-generate,build-subprojects,build-project" description="Compile Cassandra classes"/>
    <target name="build-subprojects" description="Compile Cassandra contrib projects"/>
    <target name="codecoverage" depends="cobertura-instrument,test,cobertura-report" description="Create code coverage report"/>

    <target depends="init,avro-generate,gen-cli-grammar,gen-cql2-grammar,gen-cql3-grammar"
            name="build-project">
        <echo message="${ant.project.name}: ${ant.file}"/>
        <!-- Order matters! -->
        <javac debug="true" debuglevel="${debuglevel}"
               destdir="${build.classes.thrift}" includeantruntime="false">
            <src path="${interface.thrift.dir}/gen-java"/>
            <classpath refid="cassandra.classpath"/>
        </javac>
        <javac debug="true" debuglevel="${debuglevel}"
               destdir="${build.classes.main}" includeantruntime="false">
            <src path="${build.src.java}"/>
            <src path="${build.src.gen-java}"/>
            <classpath refid="cassandra.classpath"/>
        </javac>
        <copy todir="${build.classes.main}">
            <fileset dir="${build.src.resources}" />
        </copy>
        <taskdef name="paranamer" classname="com.thoughtworks.paranamer.ant.ParanamerGeneratorTask">
          <classpath refid="cassandra.classpath" />
        </taskdef>

        <antcall target="createVersionPropFile"/>
    </target>

    <!-- Stress build file -->
    <property name="stress.build.src" value="${basedir}/tools/stress/src" />
    <property name="stress.build.classes" value="${build.classes}/stress" />
	<property name="stress.manifest" value="${stress.build.classes}/MANIFEST.MF" />
    <path id="cassandra.classes">
        <pathelement location="${basedir}/build/classes/main" />
        <pathelement location="${basedir}/build/classes/thrift" />
    </path>
    <target name="stress-build" depends="build">
    	<mkdir dir="${stress.build.classes}" />
        <javac destdir="${stress.build.classes}" includeantruntime="true">
            <src path="${stress.build.src}" />
            <classpath>
                <path refid="cassandra.classes" />
                <path>
                    <fileset dir="${build.lib}">
                        <include name="**/*.jar" />
                    </fileset>
                </path>
            </classpath>
        </javac>
    </target>

    <!--
        The jar target makes cassandra.jar output.
    -->
    <target name="jar"
            depends="maven-declare-dependencies,build, build-test, stress-build"
            description="Assemble Cassandra JAR files">
      <mkdir dir="${build.classes.main}/META-INF" />
      <mkdir dir="${build.classes.thrift}/META-INF" />
      <copy file="LICENSE.txt"
            tofile="${build.classes.main}/META-INF/LICENSE.txt"/>
      <copy file="LICENSE.txt"
            tofile="${build.classes.thrift}/META-INF/LICENSE.txt"/>
      <copy file="NOTICE.txt"
            tofile="${build.classes.main}/META-INF/NOTICE.txt"/>
      <copy file="NOTICE.txt"
            tofile="${build.classes.thrift}/META-INF/NOTICE.txt"/>

      <artifact:writepom pomRefId="parent-pom" file="${build.dir}/${final.name}-parent.pom"/>

      <!-- Thrift Jar -->
      <artifact:writepom pomRefId="thrift-pom" 
              file="${build.dir}/${ant.project.name}-thrift-${version}.pom"/>
      <jar jarfile="${build.dir}/${ant.project.name}-thrift-${version}.jar"
           basedir="${build.classes.thrift}">
        <fileset dir="${build.classes.main}">
          <include name="org/apache/cassandra/thrift/ITransportFactory.class" />
          <include name="org/apache/cassandra/thrift/TFramedTransportFactory.class" />
        </fileset>
        <manifest>
          <attribute name="Implementation-Title" value="Cassandra"/>
          <attribute name="Implementation-Version" value="${version}"/>
          <attribute name="Implementation-Vendor" value="Apache"/>
        </manifest>
      </jar>

      <!-- Main Jar -->
      <artifact:writepom pomRefId="all-pom" 
              file="${build.dir}/${final.name}.pom"/>
      <jar jarfile="${build.dir}/${final.name}.jar"
           basedir="${build.classes.main}">
        <manifest>
        <!-- <section name="org/apache/cassandra/infrastructure"> -->
          <attribute name="Implementation-Title" value="Cassandra"/>
          <attribute name="Implementation-Version" value="${version}"/>
          <attribute name="Implementation-Vendor" value="Apache"/>
          <attribute name="Premain-Class"
                     value="org.apache.cassandra.infrastructure.continuations.CAgent"/>
          <attribute name="Class-Path"
                     value="${ant.project.name}-clientutil-${version}.jar ${ant.project.name}-thrift-${version}.jar" />
        <!-- </section> -->
        </manifest>
      </jar>

      <!-- Clientutil Jar -->
      <!-- TODO: write maven pom here -->
      <artifact:writepom pomRefId="clientutil-pom"
              file="${build.dir}/${ant.project.name}-clientutil-${version}.pom"/>
      <jar jarfile="${build.dir}/${ant.project.name}-clientutil-${version}.jar">
        <fileset dir="${build.classes.main}">
          <include name="org/apache/cassandra/cql/jdbc/*" />
          <include name="org/apache/cassandra/utils/ByteBufferUtil*.class" />
          <include name="org/apache/cassandra/utils/Hex.class" />
          <include name="org/apache/cassandra/utils/UUIDGen*.class" />
        </fileset>
        <manifest>
          <attribute name="Implementation-Title" value="Cassandra"/>
          <attribute name="Implementation-Version" value="${version}"/>
          <attribute name="Implementation-Vendor" value="Apache"/>
        </manifest>
      </jar>

      <!-- Stress jar -->
      <manifest file="${stress.manifest}">
        <attribute name="Built-By" value="Pavel Yaskevich"/>
        <attribute name="Main-Class" value="org.apache.cassandra.stress.Stress"/>
      </manifest>
      <mkdir dir="${stress.build.classes}/META-INF" />
      <mkdir dir="${build.dir}/tools/lib/" />
      <jar destfile="${build.dir}/tools/lib/stress.jar" manifest="${stress.manifest}">
        <fileset dir="${stress.build.classes}"/>
      </jar>
    </target>

    <!--
        The javadoc-jar target makes cassandra-javadoc.jar output required for publishing to Maven central repository.
    -->
    <target name="javadoc-jar" description="Assemble Cassandra JavaDoc JAR file">
      <mkdir dir="${javadoc.jars.dir}"/>
      <create-javadoc destdir="${javadoc.jars.dir}/thrift">
        <filesets>
          <fileset dir="${interface.thrift.dir}/gen-java" defaultexcludes="yes">
            <include name="org/apache/**/*.java"/>
          </fileset>
        </filesets>
      </create-javadoc>
      <jar jarfile="${build.dir}/${ant.project.name}-thrift-${version}-javadoc.jar"
           basedir="${javadoc.jars.dir}/thrift"/>

      <create-javadoc destdir="${javadoc.jars.dir}/main">
        <filesets>
          <fileset dir="${build.src.java}" defaultexcludes="yes">
            <include name="org/apache/**/*.java"/>
          </fileset>
          <fileset dir="${build.src.gen-java}" defaultexcludes="yes">
            <include name="org/apache/**/*.java"/>
          </fileset>
        </filesets>
      </create-javadoc>
      <jar jarfile="${build.dir}/${final.name}-javadoc.jar"
           basedir="${javadoc.jars.dir}/main"/>

      <create-javadoc destdir="${javadoc.jars.dir}/clientutil">
        <filesets>
          <fileset dir="${build.src.java}" defaultexcludes="yes">
            <include name="org/apache/cassandra/cql/jdbc/*" />
            <include name="org/apache/cassandra/utils/ByteBufferUtil*.java" />
            <include name="org/apache/cassandra/utils/Hex.java" />
            <include name="org/apache/cassandra/utils/UUIDGen*.java" />
          </fileset>
        </filesets>
      </create-javadoc>
      <jar jarfile="${build.dir}/${ant.project.name}-clientutil-${version}-javadoc.jar"
           basedir="${javadoc.jars.dir}/clientutil"/>
      <!-- javadoc task always rebuilds so might as well remove the generated docs to prevent 
           being pulled into the distribution by accident -->
      <delete quiet="true" dir="${javadoc.jars.dir}"/>
    </target>

    <!--
        The sources-jar target makes cassandra-sources.jar output required for publishing to Maven central repository.
    -->
    <target name="sources-jar" depends="init,avro-generate" description="Assemble Cassandra Sources JAR file">
      <jar jarfile="${build.dir}/${ant.project.name}-thrift-${version}-sources.jar">
        <fileset dir="${interface.thrift.dir}/gen-java" defaultexcludes="yes">
          <include name="org/apache/**/*.java"/>
        </fileset>
      </jar>
      <jar jarfile="${build.dir}/${final.name}-sources.jar">
        <fileset dir="${build.src.java}" defaultexcludes="yes">
          <include name="org/apache/**/*.java"/>
        </fileset>
        <fileset dir="${build.src.gen-java}" defaultexcludes="yes">
          <include name="org/apache/**/*.java"/>
        </fileset>
      </jar>
      <jar jarfile="${build.dir}/${ant.project.name}-clientutil-${version}-sources.jar">
        <fileset dir="${build.src.java}" defaultexcludes="yes">
          <include name="org/apache/cassandra/cql/jdbc/*" />
          <include name="org/apache/cassandra/utils/ByteBufferUtil*.java" />
          <include name="org/apache/cassandra/utils/Hex.java" />
          <include name="org/apache/cassandra/utils/UUIDGen*.java" />
        </fileset>
      </jar>
    </target>

    <!-- creates release tarballs -->
    <target name="artifacts" depends="jar,javadoc"
            description="Create Cassandra release artifacts">
      <mkdir dir="${dist.dir}"/>
      <copy todir="${dist.dir}/lib">
        <fileset dir="${build.lib}"/>
        <fileset dir="${build.dir}">
          <include name="${final.name}.jar" />
          <include name="${ant.project.name}-thrift-${version}.jar" />
          <include name="${ant.project.name}-clientutil-${version}.jar" />
        </fileset>
      </copy>
      <copy todir="${dist.dir}/javadoc">
        <fileset dir="${javadoc.dir}"/>
      </copy>
      <copy todir="${dist.dir}/bin">
        <fileset dir="bin"/>
      </copy>
      <copy todir="${dist.dir}/conf">
        <fileset dir="conf"/>
      </copy>
      <copy todir="${dist.dir}/interface">
        <fileset dir="interface">
          <include name="**/*.thrift" />
        </fileset>
      </copy>
      <copy todir="${dist.dir}/pylib">
        <fileset dir="pylib">
          <include name="**" />
          <exclude name="**/*.pyc" />
        </fileset>
      </copy>
      <copy todir="${dist.dir}/">
        <fileset dir="${basedir}">
          <include name="*.txt" />
        </fileset>
      </copy>
      <copy todir="${dist.dir}/tools/bin">
        <fileset dir="${basedir}/tools/bin"/>
      </copy>
      <copy todir="${dist.dir}/tools/lib">
        <fileset dir="${build.dir}/tools/lib/">
            <include name="*.jar" />
        </fileset>
      </copy>
      <artifact:writepom pomRefId="dist-pom" 
            file="${build.dir}/${final.name}-dist.pom"/>
      <tar compression="gzip" longfile="gnu"
        destfile="${build.dir}/${final.name}-bin.tar.gz">

        <!-- Everything but bin/ (default mode) -->
        <tarfileset dir="${dist.dir}" prefix="${final.name}">
          <include name="**"/>
          <exclude name="bin/*" />
        </tarfileset>
        <!-- Shell includes in bin/ (default mode) -->
        <tarfileset dir="${dist.dir}" prefix="${final.name}">
          <include name="bin/*.in.sh" />
        </tarfileset>
        <!-- Executable scripts in bin/ -->
        <tarfileset dir="${dist.dir}" prefix="${final.name}" mode="755">
          <include name="bin/*"/>
          <include name="tools/bin/*"/>
          <not>
                <filename name="bin/*.in.sh" />
          </not>
        </tarfileset>
      </tar>

      <tar compression="gzip" longfile="gnu"
           destfile="${build.dir}/${final.name}-src.tar.gz">

        <tarfileset dir="${basedir}"
                    prefix="${final.name}-src">
          <include name="**"/>
          <exclude name="build/**" />
          <exclude name="src/gen-java/**" />
          <exclude name=".git/**" />
          <exclude name="bin/*" /> <!-- handled separately below -->
          <!-- exclude Eclipse files -->
          <exclude name=".project" />
          <exclude name=".classpath" />
          <exclude name=".settings/**" />
          <exclude name=".externalToolBuilders/**" />
        </tarfileset>

        <!-- Shell includes and batch files in bin/ -->
        <tarfileset dir="${basedir}" prefix="${final.name}-src">
          <include name="bin/*.in.sh" />
          <include name="bin/*.bat" />
        </tarfileset>
        <!-- Everything else (assumed to be scripts), is executable -->
        <tarfileset dir="${basedir}" prefix="${final.name}-src" mode="755">
          <include name="bin/*"/>
          <exclude name="bin/*.in.sh" />
          <exclude name="bin/*.bat" />
        </tarfileset>
      </tar>
    </target>

    <target name="release" depends="artifacts,rat-init"
            description="Create and QC release artifacts">
      <checksum forceOverwrite="yes" todir="${build.dir}" fileext=".md5"
                algorithm="MD5">
        <fileset dir="${build.dir}">
          <include name="*.tar.gz" />
        </fileset>
      </checksum>
      <checksum forceOverwrite="yes" todir="${build.dir}" fileext=".sha"
                algorithm="SHA">
        <fileset dir="${build.dir}">
          <include name="*.tar.gz" />
        </fileset>
      </checksum>

      <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
                  reportFile="${build.dir}/${final.name}-bin.rat.txt">
        <tarfileset>
          <gzipresource>
            <file file="${build.dir}/${final.name}-bin.tar.gz" />
          </gzipresource>
        </tarfileset>
      </rat:report>

      <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
                  reportFile="${build.dir}/${final.name}-src.rat.txt">
        <tarfileset>
          <gzipresource>
            <file file="${build.dir}/${final.name}-src.tar.gz" />
          </gzipresource>
        </tarfileset>
      </rat:report>
    </target>

  <target name="build-test" depends="build" description="Compile test classes">
    <javac
     debug="true"
     debuglevel="${debuglevel}"
     destdir="${test.classes}"
     includeantruntime="false">
      <classpath>
        <path refid="cassandra.classpath"/>
      </classpath>
      <src path="${test.unit.src}"/>
      <src path="${test.long.src}"/>
    </javac>

    <!-- Non-java resources needed by the test suite -->
    <copy todir="${test.classes}">
      <fileset dir="${test.resources}"/>
    </copy>
  </target>

  <macrodef name="testmacro">
    <attribute name="suitename" />
    <attribute name="inputdir" />
    <attribute name="timeout" />
    <attribute name="forkmode" default="perTest"/>
    <element name="optjvmargs" implicit="true" optional="true" />
    <attribute name="filter" default="**/${test.name}.java"/>
    <sequential>
      <echo message="running @{suitename} tests"/>
      <mkdir dir="${build.test.dir}/cassandra"/>
      <mkdir dir="${build.test.dir}/output"/>
      <junit fork="on" forkmode="@{forkmode}" failureproperty="testfailed" maxmemory="1024m" timeout="@{timeout}">
        <sysproperty key="net.sourceforge.cobertura.datafile" file="${cobertura.datafile}"/>
        <formatter type="xml" usefile="true"/>
        <formatter type="brief" usefile="false"/>
        <jvmarg value="-Dstorage-config=${test.conf}"/>
        <jvmarg value="-Daccess.properties=${test.conf}/access.properties"/>
        <jvmarg value="-Dlog4j.configuration=log4j-junit.properties" />
        <jvmarg value="-javaagent:${basedir}/lib/jamm-0.2.5.jar" />
        <jvmarg value="-ea"/>
        <optjvmargs/>
        <classpath>
          <path refid="cassandra.classpath" />
          <pathelement location="${test.classes}"/>
          <path refid="cobertura.classpath"/>
          <pathelement location="${test.conf}"/>
          <fileset dir="${test.lib}">
            <include name="**/*.jar" />
          </fileset>
        </classpath>
        <batchtest todir="${build.test.dir}/output">
          <fileset dir="@{inputdir}" includes="@{filter}" />
        </batchtest>
      </junit>
      <fail message="Some @{suitename} test(s) failed.">
        <condition>
            <and>
            <isset property="testfailed"/>
            <not>
              <isset property="ant.test.failure.ignore"/>
            </not>
          </and>
        </condition>
      </fail>
    </sequential>
  </macrodef>

  <!--
    This test target is a bit different.  It's purpose is to exercise the
    clientutil jar in order to expose any new dependencies.  For that
    reason we use the classes from the jar, and a carefully constructed
    classpath which only contains what we expect users to need.
  -->
  <target name="test-clientutil-jar" depends="build-test,jar" description="Test clientutil jar">
    <junit>
      <test name="org.apache.cassandra.cql.jdbc.ClientUtilsTest" />
      <formatter type="brief" usefile="false" />
      <classpath>
        <pathelement location="${test.classes}" />
        <pathelement location="${build.dir}/${ant.project.name}-clientutil-${version}.jar" />

        <fileset dir="${build.dir.lib}">
          <include name="**/junit*.jar" />
        </fileset>
      </classpath>
    </junit>
  </target>

  <target name="test" depends="build-test" description="Execute unit tests">
    <testmacro suitename="unit" inputdir="${test.unit.src}" timeout="60000">
      <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
      <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
      <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
    </testmacro>
  </target>
    
  <target name="test-compression" depends="build-test" description="Execute unit tests with sstable compression enabled">
    <testmacro suitename="unit" inputdir="${test.unit.src}" timeout="60000">
      <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
      <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
      <jvmarg value="-Dcassandra.test.compression=true"/>
      <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
    </testmacro>
  </target>

  <target name="msg-ser-gen-test" depends="build-test" description="Generates message serializations">
    <testmacro suitename="unit" inputdir="${test.unit.src}" 
               timeout="60000" filter="**/SerializationsTest.java">
      <jvmarg value="-Dcassandra.test-serialization-writes=True"/>
    </testmacro>
  </target>
  
  <target name="msg-ser-test" depends="build-test" description="Tests message serializations">
    <testmacro suitename="unit" inputdir="${test.unit.src}" timeout="60000"
               filter="**/SerializationsTest.java"/>
  </target>
  
  <target name="msg-ser-test-7" depends="build-test" description="Generates message serializations">
    <testmacro suitename="unit" inputdir="${test.unit.src}" 
               timeout="60000" filter="**/SerializationsTest.java">
      <jvmarg value="-Dcassandra.version=0.7"/>
    </testmacro>
  </target>

  <target name="msg-ser-test-10" depends="build-test" description="Tests message serializations on 1.0 messages">
    <testmacro suitename="unit" inputdir="${test.unit.src}" 
               timeout="60000" filter="**/SerializationsTest.java">
      <jvmarg value="-Dcassandra.version=1.0"/>
    </testmacro>
  </target>

  <target name="pbs-test" depends="build-test" description="Tests PBS predictor">
    <testmacro suitename="unit" inputdir="${test.unit.src}"
      timeout="15000" filter="**/PBSPredictorTest.java"/>
  </target>

  <target name="long-test" depends="build-test" description="Execute functional tests">
    <testmacro suitename="long" inputdir="${test.long.src}"
               timeout="${test.long.timeout}">
      <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
    </testmacro>
  </target>

  <!-- instruments the classes to later create code coverage reports -->
  <target name="cobertura-instrument" depends="build,build-test">
    <taskdef resource="tasks.properties">
      <classpath refid="cobertura.classpath"/>
    </taskdef>

    <delete file="${cobertura.datafile}"/>

    <cobertura-instrument todir="${cobertura.classes.dir}" datafile="${cobertura.datafile}">
      <ignore regex="org.apache.log4j.*"/>

      <fileset dir="${build.classes.main}">
        <include name="**/*.class"/>
        <exclude name="**/*Test.class"/>
        <exclude name="**/*TestCase.class"/>
        <exclude name="**/test/*.class"/>
        <!-- cobertura modifies the serialVersionUID of classes. Some of our unit tests rely on backward
        wire compatability of these classes.  It was easier to exlude them from instrumentation than to
        force their serialVersinUIDs. -->
        <exclude name="**/*Token.class"/>
        <exclude name="${cobertura.excludes}"/>
      </fileset>

    </cobertura-instrument>
  </target>

  <!-- create both html and xml code coverage reports -->
  <target name="cobertura-report">
    <cobertura-report format="html" destdir="${cobertura.report.dir}" srcdir="${build.src.java}"
      datafile="${cobertura.datafile}"/>
    <cobertura-report format="xml" destdir="${cobertura.report.dir}" srcdir="${build.src.java}"
      datafile="${cobertura.datafile}"/>
  </target>

  <!--
    License audit tool
  -->
  <target name="rat-init" depends="maven-ant-tasks-init">
    <artifact:dependencies pathId="rat.classpath">
      <dependency groupId="org.apache.rat" artifactId="apache-rat-tasks" version="0.6" />
    </artifact:dependencies>
    <typedef uri="antlib:org.apache.rat.anttasks" classpathref="rat.classpath"/>
  </target>

  <target name="rat-check" depends="rat-init">
    <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
                reportFile="${build.dir}/rat-report.log">
      <fileset dir="."  excludesfile=".rat-excludes" />
    </rat:report>
    <condition property="rat.passed">
      <isfileselected file="${build.dir}/rat-report.log">
        <containsregexp expression="^0 Unknown Licenses"/>
      </isfileselected>
    </condition>
    <fail unless="rat.passed">Unknown licenses: See build/rat-report.log.</fail>
  </target>

  <target name="rat-write" depends="rat-init">
    <echo>RAT: invoking addLicense to write missing headers</echo>
    <java classname="org.apache.rat.Report" fork="true"
          output="${build.dir}/rat-report.log">
      <classpath refid="rat.classpath" />
      <arg value="-a" />
      <arg value="--force" />
      <arg value="." />
    </java>
  </target>

  <target name="javadoc" depends="init" description="Create javadoc">
    <create-javadoc destdir="${javadoc.dir}">
      <filesets>
      <fileset dir="${build.src.java}" defaultexcludes="yes">
        <include name="org/apache/**/*.java"/>
      </fileset>
      <fileset dir="${interface.thrift.gen-java}" defaultexcludes="yes">
        <include name="org/apache/**/*.java"/>
      </fileset>
      </filesets>
    </create-javadoc>
   </target>

  <!-- Generate Eclipse project description files -->
  <target name="generate-eclipse-files" depends="build" description="Generate eclipse files">
    <echo file=".project"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
  <name>${eclipse.project.name}</name>
  <comment></comment>
  <projects>
  </projects>
  <buildSpec>
    <buildCommand>
      <name>org.eclipse.jdt.core.javabuilder</name>
    </buildCommand>
  </buildSpec>
  <natures>
    <nature>org.eclipse.jdt.core.javanature</nature>
  </natures>
</projectDescription>]]>
    </echo>
	<echo file=".classpath"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<classpath>
  <classpathentry kind="src" path="src/java"/>
  <classpathentry kind="src" path="src/gen-java"/>
  <classpathentry kind="src" path="interface/thrift/gen-java"/>
  <classpathentry kind="src" path="test/unit"/>
  <classpathentry kind="src" path="test/long"/>
  <classpathentry kind="src" path="tools/stress/src"/>
  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  <classpathentry kind="output" path="build/classes/main"/>
  <classpathentry kind="lib" path="build/classes/thrift"/>
  <classpathentry kind="lib" path="build/test/classes"/>
  <classpathentry kind="lib" path="test/conf"/>
]]>
	</echo>	  
  	<path id="eclipse-project-libs-path">
  	 <fileset dir="lib">
  	    <include name="**/*.jar" />
     </fileset>
 	 <fileset dir="build/lib/jars">
  	    <include name="**/*.jar" />
  	 </fileset>
  	</path>
  	<property name="eclipse-project-libs" refid="eclipse-project-libs-path"/>
  	<script language="javascript"> <![CDATA[
  		importClass(java.io.File);
  		jars = project.getProperty("eclipse-project-libs").split(project.getProperty("path.separator"));
  		
  		cp = "";
  	    for (i=0; i< jars.length; i++) {
  	       cp += ' <classpathentry kind="lib" path="'+jars[i]+'"/>\n';
  		}
  		
  		cp += '</classpath>';
  	    
  		echo = project.createTask("echo");
  	    echo.setMessage(cp);
  		echo.setFile(new File(".classpath"));
  		echo.setAppend(true);
  	    echo.perform();	     
  	]]> </script>
    <mkdir dir=".settings" />
  </target>

  <pathconvert property="eclipse.project.name">
    <path path="${basedir}" />
    <regexpmapper from="^.*/([^/]+)$$" to="\1" handledirsep="yes" />
  </pathconvert>

  <!-- Clean Eclipse project description files -->
  <target name="clean-eclipse-files">
    <delete file=".project" />
    <delete file=".classpath" />
    <delete dir=".settings" />
  	<delete dir=".externalToolBuilders" />
  	<delete dir="build/eclipse-classes" />
  </target>

  <!-- Publish artifacts to Maven repositories -->
  <target name="mvn-install"
          depends="maven-declare-dependencies,artifacts,jar,sources-jar,javadoc-jar"
          description="Installs the artifacts in the Maven Local Repository">
          
    <!-- the parent -->
    <install pomFile="${build.dir}/${final.name}-parent.pom"
             file="${build.dir}/${final.name}-parent.pom"
             packaging="pom"/>

    <!-- the distribution -->
    <install pomFile="${build.dir}/${final.name}-dist.pom"
             file="${build.dir}/${final.name}-dist.pom"
             packaging="pom"/>
    <install pomFile="${build.dir}/${final.name}-dist.pom"
             file="${build.dir}/${final.name}-bin.tar.gz"
             packaging="tar.gz"
             classifier="bin"/>
    <install pomFile="${build.dir}/${final.name}-dist.pom"
             file="${build.dir}/${final.name}-src.tar.gz"
             packaging="tar.gz"
             classifier="src"/>
          
    <!-- the cassandra-thrift jar -->  
    <install pomFile="${build.dir}/${ant.project.name}-thrift-${version}.pom"
             file="${build.dir}/${ant.project.name}-thrift-${version}.jar"/>
    <install pomFile="${build.dir}/${ant.project.name}-thrift-${version}.pom"
             file="${build.dir}/${ant.project.name}-thrift-${version}-sources.jar"
             classifier="sources"/>
    <install pomFile="${build.dir}/${ant.project.name}-thrift-${version}.pom"
             file="${build.dir}/${ant.project.name}-thrift-${version}-javadoc.jar"
             classifier="javadoc"/>

    <!-- the cassandra-clientutil jar -->  
    <install pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
             file="${build.dir}/${ant.project.name}-clientutil-${version}.jar"/>
    <install pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
             file="${build.dir}/${ant.project.name}-clientutil-${version}-sources.jar"
             classifier="sources"/>
    <install pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
             file="${build.dir}/${ant.project.name}-clientutil-${version}-javadoc.jar"
             classifier="javadoc"/>

    <!-- the cassandra-all jar -->
    <install pomFile="${build.dir}/${final.name}.pom"
             file="${build.dir}/${final.name}.jar"/>
    <install pomFile="${build.dir}/${final.name}.pom"
             file="${build.dir}/${final.name}-sources.jar"
             classifier="sources"/>
    <install pomFile="${build.dir}/${final.name}.pom"
             file="${build.dir}/${final.name}-javadoc.jar"
             classifier="javadoc"/>
  </target>

  <target name="publish"
          depends="mvn-install"
          if="release"
          description="Publishes the artifacts to the Maven repository">
          
    <!-- the parent -->
    <deploy pomFile="${build.dir}/${final.name}-parent.pom"
            file="${build.dir}/${final.name}-parent.pom"
            packaging="pom"/>

    <!-- the distribution -->
    <deploy pomFile="${build.dir}/${final.name}-dist.pom"
            file="${build.dir}/${final.name}-dist.pom"
            packaging="pom"/>
    <deploy pomFile="${build.dir}/${final.name}-dist.pom"
            file="${build.dir}/${final.name}-bin.tar.gz"
            packaging="tar.gz"
            classifier="bin"/>
    <deploy pomFile="${build.dir}/${final.name}-dist.pom"
            file="${build.dir}/${final.name}-src.tar.gz"
            packaging="tar.gz"
            classifier="src"/>
          
    <!-- the cassandra-thrift jar -->  
    <deploy pomFile="${build.dir}/${ant.project.name}-thrift-${version}.pom"
            file="${build.dir}/${ant.project.name}-thrift-${version}.jar"/>
    <deploy pomFile="${build.dir}/${ant.project.name}-thrift-${version}.pom"
            file="${build.dir}/${ant.project.name}-thrift-${version}-sources.jar"
            classifier="sources"/>
    <deploy pomFile="${build.dir}/${ant.project.name}-thrift-${version}.pom"
            file="${build.dir}/${ant.project.name}-thrift-${version}-javadoc.jar"
            classifier="javadoc"/>

    <!-- the cassandra-clientutil jar -->  
    <deploy pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
            file="${build.dir}/${ant.project.name}-clientutil-${version}.jar"/>
    <deploy pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
             file="${build.dir}/${ant.project.name}-clientutil-${version}-sources.jar"
             classifier="sources"/>
    <deploy pomFile="${build.dir}/${ant.project.name}-clientutil-${version}.pom"
             file="${build.dir}/${ant.project.name}-clientutil-${version}-javadoc.jar"
             classifier="javadoc"/>
    <!-- the cassandra-all jar -->
    <deploy pomFile="${build.dir}/${final.name}.pom"
            file="${build.dir}/${final.name}.jar"/>
    <deploy pomFile="${build.dir}/${final.name}.pom"
            file="${build.dir}/${final.name}-sources.jar"
            classifier="sources"/>
    <deploy pomFile="${build.dir}/${final.name}.pom"
            file="${build.dir}/${final.name}-javadoc.jar"
            classifier="javadoc"/>
  </target>
</project>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.