forked from pravega/pravega
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
1621 lines (1428 loc) · 70 KB
/
build.gradle
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
import org.gradle.internal.jvm.Jvm
/**
* Copyright Pravega Authors.
*
* Licensed 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.
*/
// Apply the java plugin to add support for Java
buildscript {
// log the current JVM version.
println "Build JVM Version is : " + Jvm.current()
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath group: 'com.google.protobuf', name:'protobuf-gradle-plugin', version: protobufGradlePlugin
classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.3.0"
classpath group: 'org.hidetake', name: 'gradle-ssh-plugin', version: gradleSshPluginVersion
classpath group: 'ru.vyarus', name: 'gradle-mkdocs-plugin', version: gradleMkdocsPluginVersion
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:${spotbugsPluginVersion}"
classpath "org.ajoberstar.grgit:grgit-gradle:${gradleGitPluginVersion}"
classpath "org.ajoberstar.grgit:grgit-core:${gradleGitPluginVersion}"
classpath "io.franzbecker:gradle-lombok:${gradleLombokPluginVersion}"
}
// Specifically force the version for GrGit plugin required modules to prevent downloading the most recent release.
configurations.all {
resolutionStrategy {
force "org.ajoberstar.grgit:grgit-gradle:" + gradleGitPluginVersion
force "org.ajoberstar.grgit:grgit-core:" + gradleGitPluginVersion
}
}
}
if (project.hasProperty("enableMkdocs") && project.property("enableMkdocs").equalsIgnoreCase("true")) {
apply from: "$rootDir/gradle/mkdocs.gradle"
}
// apply the plugin outside of allProjects since the plugin attempts to set the grgit property for all the projects
// https://github.com/ajoberstar/grgit/blob/master/src/main/groovy/org/ajoberstar/grgit/gradle/GrgitPlugin.groovy#L27
apply plugin: 'org.ajoberstar.grgit'
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
if (file("src/main/java").isDirectory()) {
apply plugin: 'java'
apply plugin: 'io.franzbecker.gradle-lombok'
lombok {
version = lombokVersion
}
dependencies {
//These are compile time only dependencies needed accross all targets. Lombok uses them and may generate strange errors if they are missing.
compileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: spotbugsAnnotationsVersion
testCompileOnly group: 'com.github.spotbugs', name: 'spotbugs-annotations', version: spotbugsAnnotationsVersion
compileOnly group: 'net.jcip', name: 'jcip-annotations', version: jcipAnnotationsVersion
testCompileOnly group: 'net.jcip', name: 'jcip-annotations', version: jcipAnnotationsVersion
compileOnly 'org.projectlombok:lombok:' + lombokVersion
testCompileOnly 'org.projectlombok:lombok:' + lombokVersion
annotationProcessor 'org.projectlombok:lombok:' + lombokVersion
testAnnotationProcessor 'org.projectlombok:lombok:' + lombokVersion
}
// Delombok sources.
task delombok(type: io.franzbecker.gradle.lombok.task.DelombokTask, dependsOn: compileJava) {
ext.outputDir = file("$buildDir/delombok")
outputs.dir(outputDir)
sourceSets.main.java.srcDirs.each {
inputs.dir(it)
args(it, "-d", outputDir)
}
}
}
// Plugin configurations
apply from: "$rootDir/gradle/application.gradle"
apply from: "$rootDir/gradle/checkstyle.gradle"
apply from: "$rootDir/gradle/eclipse.gradle"
apply from: "$rootDir/gradle/spotbugs.gradle"
apply from: "$rootDir/gradle/idea.gradle"
apply from: "$rootDir/gradle/jacoco.gradle"
apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/maven.gradle"
apply from: "$rootDir/gradle/protobuf.gradle"
apply from: "$rootDir/gradle/rat.gradle"
repositories {
mavenCentral()
mavenLocal()
}
version = getProjectVersion()
group = "io.pravega"
configurations.all {
resolutionStrategy {
//failOnVersionConflict()
force "com.google.guava:guava:" + guavaVersion
force "com.google.protobuf:protobuf-java:" + protobufProtocVersion
force "com.google.protobuf:protobuf-java-util:" + protobufProtocVersion
force "io.grpc:grpc-context:" + grpcVersion
force "commons-beanutils:commons-beanutils:" + commonsBeanutilsVersion
force "org.apache.commons:commons-compress:" + apacheCommonsCompressVersion
force "org.apache.commons:commons-lang3:" + commonsLang3Version
force "org.apache.curator:curator-framework:" + apacheCuratorVersion
force "org.glassfish.jersey.core:jersey-common:" + jerseyVersion
force "org.glassfish.jersey.core:jersey-server:" + jerseyVersion
force "com.fasterxml.jackson.core:jackson-databind:" + jacksonVersion
force "org.slf4j:slf4j-api:" + slf4jApiVersion
force "org.apache.zookeeper:zookeeper:" + apacheZookeeperVersion
force "io.netty:netty-common:" + nettyVersion
force "io.netty:netty-transport:" + nettyVersion
force "io.netty:netty-handler:" + nettyVersion
force "io.netty:netty-codec:" + nettyVersion
force "io.netty:netty-codec-dns:" + nettyVersion
force "io.netty:netty-codec-http:" + nettyVersion
force "io.netty:netty-codec-http2:" + nettyVersion
force "io.netty:netty-codec-socks:" + nettyVersion
force "io.netty:netty-handler-proxy:" + nettyVersion
force "io.netty:netty-resolver-dns:" + nettyVersion
force "io.netty:netty-transport-native-epoll:" + nettyVersion
force "io.netty:netty-tcnative-boringssl-static:" + nettyBoringSSLVersion
force "junit:junit:" + junitVersion
force "org.bouncycastle:bcprov-jdk15on:" + bouncyCastleVersion
force "org.bouncycastle:bcpkix-jdk15on:" + bouncyCastleVersion
force "org.apache.avro:avro:" + apacheAvroVersion
force "org.jetbrains.kotlin:kotlin-stdlib-common:" + kotlinVersion
force "org.jetbrains.kotlin:kotlin-stdlib:" + kotlinVersion
force "org.yaml:snakeyaml:" + snakeYamlVersion
force "com.fasterxml.woodstox:woodstox-core:" + woodstoxVersion
force "org.jdom:jdom2:" + jdomVersion
force "commons-net:commons-net:" + commonsNetVersion
// Netty 4 uber jar
exclude group: 'io.netty', module: 'netty-all'
// Netty 3
exclude group: 'io.netty', module: 'netty'
dependencySubstitution {
substitute module("javax.ws.rs:jsr311-api") with module("javax.ws.rs:javax.ws.rs-api:" + javaxwsrsApiVersion)
}
}
}
tasks.withType(Test) {
jvmArgs = ["-Xmx2g"]
}
}
project('common') {
dependencies {
testCompile project(':test:testcommon')
compile group: 'commons-io', name: 'commons-io', version: commonsioVersion
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
//Do NOT add any additional dependencies here.
}
tasks.withType(JavaCompile) {
options.compilerArgs.remove(getDefaultJavaVersion())
options.compilerArgs.add(clientJavaVersion)
}
javadoc {
title = "Pravega Common Libraries"
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
/**
* common_server is the same as 'common' except that it is meant for server-side consumption only (Segment Store or
* Controller). This should never be used by the Client (or any of its dependencies) since the Client must compile with
* JDK8, while the Server may use newer versions of the JDK.
*/
project('common_server') {
dependencies {
compile project(':common')
testCompile project(':test:testcommon')
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
//Do NOT add any additional dependencies here.
}
javadoc {
title = "Pravega Common Libraries for Server-Side use Only"
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
def withoutLogger = { exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'org.slf4j', module: 'slf4j-simple' }
def withoutJaxbAndJjwt = { exclude group: 'javax.xml.bind', module: 'jaxb-api'
exclude group: 'org.glassfish.jaxb', module: 'jaxb-runtime'
exclude group: 'io.jsonwebtoken', module: 'jjwt'}
project('shared:authplugin') {
dependencies {
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
}
tasks.withType(JavaCompile) {
options.compilerArgs.remove(getDefaultJavaVersion())
options.compilerArgs.add(clientJavaVersion)
}
javadoc {
title = "Pravega Auth API"
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('shared:basic-authplugin') {
dependencies {
compile project(':common')
compile project(':shared:authplugin')
compile project(':shared:security')
testCompile project(':test:testcommon')
}
javadoc {
title = "AuthHandler supporting HTTP Basic Authentication"
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('shared:security') {
dependencies {
compile project(':common')
compile project(':shared:authplugin')
compile project(':shared:protocol')
compile group: 'io.jsonwebtoken', name: 'jjwt', version: jjwtVersion
// Adding JAXB API and the reference implementation as a dependency here, since they are not available
// in newer Java SE versions (9 and newer).
compile group: 'javax.xml.bind', name: 'jaxb-api', version: jaxbVersion
compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: jaxbVersion
// We need to explicitly import these as Bookkeeper 4.14+ is not transitively including them anymore.
compile group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: bouncyCastleVersion
testCompile project(':test:testcommon')
}
tasks.withType(JavaCompile) {
options.compilerArgs.remove(getDefaultJavaVersion())
options.compilerArgs.add(clientJavaVersion)
}
javadoc {
exclude 'io/pravega/shared/*'
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project ('shared:cluster') {
dependencies {
compile project(':common')
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
compile group: 'org.apache.commons', name: 'commons-lang3', version: commonsLang3Version
compile group: 'org.apache.curator', name: 'curator-recipes', version: apacheCuratorVersion
testCompile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
testCompile project(':test:testcommon')
}
javadoc {
exclude 'io/pravega/shared/*'
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project ('shared:metrics') {
dependencies {
compile group: 'io.micrometer', name: 'micrometer-core', version: micrometerVersion
// https://mvnrepository.com/artifact/io.micrometer/micrometer-core/<micrometerVersion>
compile group: 'io.micrometer', name: 'micrometer-registry-statsd', version: micrometerVersion
// https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-statsd/<micrometerVersion>
compile group: 'io.micrometer', name: 'micrometer-registry-influx', version: micrometerVersion
// https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-influx/<micrometerVersion>
compile group: 'io.micrometer', name: 'micrometer-registry-prometheus', version: micrometerVersion
// https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus/<micrometerVersion>
compile project(':common')
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: jerseyVersion
runtimeOnly group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: jerseyVersion
compile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
testCompile project(':test:testcommon')
testCompile group: 'javax.xml.bind', name: 'jaxb-api', version: jaxbVersion
}
javadoc {
exclude 'io/pravega/shared/*'
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('shared:protocol') {
dependencies {
compile project(':common')
compile group: 'io.netty', name: 'netty-handler', version: nettyVersion
compile group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: nettyBoringSSLVersion
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
testCompile project(':test:testcommon')
testCompile group: 'org.slf4j', name: 'log4j-over-slf4j', version: slf4jApiVersion
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
testCompile project(path: ':common', configuration: 'testRuntime')
}
tasks.withType(JavaCompile) {
options.compilerArgs.remove(getDefaultJavaVersion())
options.compilerArgs.add(clientJavaVersion)
}
}
project ('shared:rest') {
sourceSets {
main.resources.srcDirs += "$projectDir/src/conf"
test.resources.srcDirs += "$rootDir/config"
}
dependencies {
compile project(':common')
compile "io.grpc:grpc-core:" + grpcVersion
compile project(":shared:authplugin")
compile project(":shared:basic-authplugin")
compile project(":shared:security")
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: jerseyVersion
compile group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: jerseyVersion
testCompile project(':test:testcommon')
testCompile project(":shared:authplugin").sourceSets.test.output
testCompile "io.grpc:grpc-netty:" + grpcVersion
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
}
}
project ('shared:health') {
dependencies {
compile project(':common')
testCompile project(':test:testcommon')
compile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
}
javadoc {
exclude 'io/pravega/shared/*'
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project ('shared:health-bindings') {
dependencies {
compile project(':shared:health')
compile project(':shared:rest')
compile group: 'javax.servlet', name: 'javax.servlet-api', version: javaxServletApiVersion
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: jerseyVersion
compile(group: 'io.swagger', name: 'swagger-jersey2-jaxrs', version: swaggerJersey2JaxrsVersion) {
exclude group: 'com.google.guava', module: 'guava'
}
compile group: 'javax.xml.bind', name: 'jaxb-api', version: jaxbVersion
compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: jaxbVersion
testCompile project(':test:testcommon')
}
javadoc {
exclude 'io/pravega/shared/*'
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('client') {
dependencies {
compile project(':common')
compile project(':shared:authplugin')
compile project(':shared:protocol')
compile project(":shared:controller-api")
compile project(":shared:security"), withoutJaxbAndJjwt
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
testCompile project(':test:testcommon')
testCompile group: 'org.slf4j', name: 'log4j-over-slf4j', version: slf4jApiVersion
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
// this is used to create a mock server.
testCompile group: 'io.netty', name: 'netty-transport-native-epoll', version: nettyVersion, classifier: 'linux-x86_64'
}
tasks.withType(JavaCompile) {
options.compilerArgs.remove(getDefaultJavaVersion())
options.compilerArgs.add(clientJavaVersion)
}
javadoc {
title = "Pravega Client API"
dependsOn delombok
source = delombok.outputDir
failOnError = true
exclude "**/impl/**";
}
}
project('test:testcommon') {
dependencies {
compile group: 'junit', name: 'junit', version: junitVersion
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
compile group: 'org.apache.commons', name: 'commons-lang3', version: commonsLang3Version
compile group: 'commons-io', name: 'commons-io', version: commonsioVersion
compile group: 'io.netty', name: 'netty-common', version: nettyVersion
compile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion, withoutLogger
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion
}
tasks.withType(JavaCompile) {
options.compilerArgs.remove(getDefaultJavaVersion())
options.compilerArgs.add(clientJavaVersion)
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('segmentstore:contracts') {
dependencies {
compile project(':common')
compile project(':common_server')
testCompile project(':test:testcommon')
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('segmentstore:storage') {
dependencies {
compile project(':common')
compile project(':shared:protocol')
compile project(':segmentstore:contracts')
compile project(':shared:metrics')
testCompile project(':test:testcommon')
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('segmentstore:storage:impl') {
dependencies {
compile project(':common')
compile project(':segmentstore:storage')
compile project(':shared:metrics')
compile group: 'org.apache.curator', name: 'curator-framework', version: apacheCuratorVersion
compile group: 'org.apache.bookkeeper', name: 'bookkeeper-server', version: bookKeeperVersion, withoutLogger
testCompile project(':test:testcommon')
testCompile project(path:':segmentstore:storage', configuration:'testRuntime')
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project ('bindings') {
dependencies {
// For HDFS
compile group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion, withoutLogger
compile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: hadoopVersion, withoutLogger
compile group: 'org.apache.hadoop', name: 'hadoop-hdfs-client', version: hadoopVersion, withoutLogger
testCompile group: 'org.apache.hadoop', name: 'hadoop-minicluster', version: hadoopVersion, withoutLogger
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
// Adding JAXB API and the reference implementation as dependencies here, since they are not available
// in newer Java SE versions (11 and newer).
compile group: 'javax.xml.bind', name: 'jaxb-api', version: jaxbVersion
compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: jaxbVersion
compile group: 'javax.activation', name: 'javax.activation-api', version: activationVersion
testCompile group: 'io.netty', name: 'netty-codec-http', version: nettyVersion
//For Extended S3
compile group: 'com.emc.ecs', name: 'object-client', version: ecsObjectClientVersion, withoutLogger
compile group: 'software.amazon.awssdk', name: 's3', version: awsSdkVersion
compile group: 'software.amazon.awssdk', name: 'sts', version: awsSdkVersion
compile group: 'com.azure', name: 'azure-storage-blob', version: azureSdkVersion
// These were previously brought in as transitive dependencies of HDFS, although they were required for running
// ExtendedS3SimpleStorageTests. But since the HDFS 3.x upgrade, these transitive dependencies are excluded,
// so adding explicit dependencies is necessary (as well as desirable).
implementation group: 'com.google.guava', name: 'guava', version: guavaVersion
implementation group: 'com.google.inject.extensions', name: 'guice-assistedinject', version: guiceVersion
implementation group: 'com.google.inject.extensions', name: 'guice-servlet', version: guiceVersion
implementation group: 'com.google.inject', name: 'guice', version: guiceVersion
implementation group: 'com.google.cloud', name: 'google-cloud-storage', version: gcpSdkVersion
implementation group: 'com.google.cloud', name: 'google-cloud-nio', version: gcpCloudNioVersion
compile project(':common')
compile project(':segmentstore:storage')
compile project(':shared:metrics')
testCompile project(':test:testcommon')
testCompile project(path: ':segmentstore:storage', configuration: 'testRuntime')
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('segmentstore:server') {
dependencies {
compile project(':common')
compile project(':common_server')
compile project(':segmentstore:contracts')
compile project(':segmentstore:storage')
compile project(':shared:metrics')
compile project(':shared:rest')
compile project(':shared:health')
testCompile project(':bindings')
testCompile project(':test:testcommon')
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('segmentstore:server:host') {
apply plugin: 'application'
applicationName = "pravega-segmentstore"
mainClassName = "io.pravega.segmentstore.server.host.ServiceStarter"
startScripts {
classpath += files('$APP_HOME/pluginlib')
doLast {
def scriptFile = file getUnixScript()
scriptFile.text = scriptFile.text.replace('$APP_HOME/lib/pluginlib', '$APP_HOME/pluginlib/*')
def winScriptFile = file getWindowsScript()
winScriptFile.text = winScriptFile.text.replace('%APP_HOME%\\lib\\pluginlib', '%APP_HOME%\\pluginlib\\*')
}
}
applicationDefaultJvmArgs = ["-server", "-Xms512m", "-XX:+HeapDumpOnOutOfMemoryError",
"-Dlog.dir=PRAVEGA_APP_HOME/logs",
"-Dlog.name=segmentstore",
"-Dpravega.configurationFile=PRAVEGA_APP_HOME/conf/config.properties",
"-Dlogback.configurationFile=PRAVEGA_APP_HOME/conf/logback.xml"]
applicationDistribution.from('src/config') {
into "conf"
}
dependencies {
compile project(':common')
compile project(":shared:authplugin")
compile project(":shared:security")
compile project(':shared:cluster')
compile project(':segmentstore:contracts')
compile project(':client')
compile project(':segmentstore:storage')
compile project(':segmentstore:storage:impl')
compile project(':shared:health')
compile project(':shared:rest')
compile project(':bindings')
compile project(':shared:health-bindings')
compile project(':segmentstore:server')
compile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
testCompile project(':test:testcommon')
testCompile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
testCompile project(path:':segmentstore:server', configuration:'testRuntime')
testCompile group: 'org.apache.hadoop', name: 'hadoop-minicluster', version: hadoopVersion, withoutLogger
testCompile project(path:':segmentstore:storage:impl', configuration:'testRuntime')
testCompile project(path:':bindings', configuration:'testRuntime')
testCompile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
testCompile group: 'com.google.cloud', name: 'google-cloud-storage', version: gcpSdkVersion
testCompile group: 'com.google.cloud', name: 'google-cloud-nio', version: gcpCloudNioVersion
}
task createAppWithGCLogging(type: CreateStartScripts) {
applicationName = "pravega-segmentstore-withGCLogging"
mainClassName = "io.pravega.controller.server.Main"
defaultJvmOpts = ["-server", "-Xms512m", "-XX:+HeapDumpOnOutOfMemoryError",
"-XX:+PrintGCDetails", "-XX:+PrintGCDateStamps",
"-Xloggc:PRAVEGA_APP_HOME/logs/gc.log", "-XX:+UseGCLogFileRotation",
"-XX:NumberOfGCLogFiles=2", "-XX:GCLogFileSize=64m",
"-Dlog.dir=PRAVEGA_APP_HOME/logs",
"-Dlog.name=segmentstore",
"-Dpravega.configurationFile=PRAVEGA_APP_HOME/conf/config.properties",
"-Dlogback.configurationFile=PRAVEGA_APP_HOME/conf/logback.xml"]
classpath = startScripts.classpath
outputDir = startScripts.outputDir
}
applicationDistribution.into("bin") {
from(createAppWithGCLogging)
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('test:integration') {
apply plugin: 'application'
applicationName = "pravega-selftest"
mainClassName = "io.pravega.test.integration.selftest.SelfTestRunner"
applicationDefaultJvmArgs = ["-server", "-Xmx4g", "-XX:+HeapDumpOnOutOfMemoryError",
"-Dlog.dir=PRAVEGA_APP_HOME/logs",
"-Dlog.name=selftest"]
applicationDistribution.from('src/config') {
into "conf"
}
test {
jvmArgs = ["-server", "-Xmx2g", "-XX:+HeapDumpOnOutOfMemoryError",
"-Dlog.dir=PRAVEGA_APP_HOME/logs",
"-Dlog.name=selftest"]
}
dependencies {
compile project(':common')
compile project(':client')
compile project(':segmentstore:server')
compile project(':segmentstore:server:host')
compile project(':controller')
compile project(':test:testcommon')
compile group: 'junit', name:'junit', version: junitVersion
compile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
testCompile group: 'org.apache.commons', name: 'commons-csv', version: apacheCommonsCsvVersion
testCompile project(path:':common', configuration:'testRuntime')
testCompile project(path:':shared:protocol', configuration:'testRuntime')
testCompile project(path:':segmentstore:server', configuration:'testRuntime')
testCompile project(path:':segmentstore:server:host', configuration:'testRuntime')
testCompile project(path:':shared:metrics', configuration:'testRuntime')
// Workaround for intellij issue, since we cannot add both the compile dependency and the testRuntime
// dependency of the client project into the compile scope of the integration tests
compile files(project(':client').sourceSets.test.output)
}
task startServer(type: JavaExec) {
main = "io.pravega.segmentstore.server.host.ServiceStarter"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task startBenchmark(type: JavaExec) {
main = "io.pravega.segmentstore.server.host.ServiceBenchmark"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task startLocalService(type: JavaExec) {
main = "io.pravega.test.integration.demo.StartLocalService"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task startWriter(type: JavaExec) {
main = "io.pravega.test.integration.demo.StartWriter"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task startReader(type: JavaExec) {
main = "io.pravega.test.integration.demo.StartReader"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task startController(type: JavaExec) {
main = "io.pravega.controller.server.Main"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task startScaleTest(type: JavaExec) {
main = "io.pravega.test.integration.demo.ScaleTest"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task startEndToEndTransactionTest(type: JavaExec) {
main = "io.pravega.test.integration.demo.EndToEndTransactionTest"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task startEventProcessorTest(type: JavaExec) {
main = "io.pravega.test.integration.demo.EventProcessorTest"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
task selftest(type: JavaExec) {
main = "io.pravega.test.integration.selftest.SelfTestRunner"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
systemProperties System.getProperties()
}
task compatibilityCheck(type: JavaExec){
main = "io.pravega.test.integration.compatibility.CompatibilityChecker"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
systemProperties System.getProperties()
}
/**
* See: https://github.com/pravega/pravega/wiki/Pravega-User-CLI.
* This will only work well from the console if all Gradle output is suppressed: -q --console=plain
*/
task startInteractiveDemo(type: JavaExec) {
main = "io.pravega.test.integration.demo.interactive.InteractiveDemo"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
systemProperties System.getProperties()
systemProperties 'logback.configurationFile' : new File("${project.rootDir}/config/logback.xml")
}
}
project('shared:controller-api') {
apply plugin: 'com.google.protobuf'
dependencies {
compile project(':common')
compile group: 'org.apache.commons', name: 'commons-lang3', version: commonsLang3Version
compile group: 'commons-io', name: 'commons-io', version: commonsioVersion
compile "io.grpc:grpc-auth:" + grpcVersion
// Since Java 10 javax.annotation is no longer bundled with the JRE
compileOnly group: 'javax.annotation', name: 'javax.annotation-api', version: javaxAnnotationVersion
}
tasks.withType(JavaCompile) {
options.compilerArgs.remove(getDefaultJavaVersion())
options.compilerArgs.add(clientJavaVersion)
}
javadoc {
exclude 'io/pravega/controller/*'
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('controller') {
sourceSets {
main.resources.srcDirs += "$projectDir/src/conf"
test.resources.srcDirs += "$rootDir/config"
}
apply plugin: 'application'
applicationName = "pravega-controller"
mainClassName = "io.pravega.controller.server.Main"
applicationDefaultJvmArgs = ["-server", "-Xms128m", "-XX:+HeapDumpOnOutOfMemoryError",
"-Dconfig.file=PRAVEGA_APP_HOME/conf/controller.config.properties",
"-Dlogback.configurationFile=PRAVEGA_APP_HOME/conf/logback.xml",
"-Dlog.dir=PRAVEGA_APP_HOME/logs",
"-Dlog.name=controller"]
startScripts {
classpath += files('$APP_HOME/pluginlib')
doLast {
def scriptFile = file getUnixScript()
scriptFile.text = scriptFile.text.replace('$APP_HOME/lib/pluginlib', '$APP_HOME/pluginlib/*')
def winScriptFile = file getWindowsScript()
winScriptFile.text = winScriptFile.text.replace('%APP_HOME%\\lib\\pluginlib', '%APP_HOME%\\pluginlib\\*')
}
}
applicationDistribution.from('src/conf') {
into "conf"
rename "application.conf", "controller.conf"
}
applicationDistribution.into('') {
def pluginDirBase = new File(System.getProperty("java.io.tmpdir", "/tmp") + "/dummy-dir")
pluginDirBase.mkdirs()
def logDir = new File(pluginDirBase.absolutePath + '/pluginlib')
logDir.mkdirs()
from {pluginDirBase}
}
dependencies {
compile project(':common')
compile project(":shared:authplugin")
compile project(":shared:basic-authplugin")
compile project(":shared:security")
compile project(":shared:controller-api")
compile project(':shared:cluster')
compile project(":client")
compile project(":shared:metrics")
compile project(":shared:rest")
compile project(":shared:health")
compile project(":shared:health-bindings")
runtimeOnly group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
compile group: 'javax.servlet', name: 'javax.servlet-api', version: javaxServletApiVersion
compile(group: 'io.swagger', name : 'swagger-jersey2-jaxrs', version :swaggerJersey2JaxrsVersion) {
exclude group: 'com.google.guava', module: 'guava'
}
compile group: 'org.apache.curator', name: 'curator-framework', version: apacheCuratorVersion
compile group: 'org.apache.curator', name: 'curator-recipes', version: apacheCuratorVersion
compile group: 'org.apache.curator', name: 'curator-client', version: apacheCuratorVersion
compile group: 'org.apache.commons', name: 'commons-lang3', version: commonsLang3Version
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: jerseyVersion
testCompile project(':test:testcommon')
testCompile project(':shared:basic-authplugin')
testCompile project(":shared:authplugin").sourceSets.test.output
testCompile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
compile group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: nettyBoringSSLVersion
// since Java 10 JAXB is not more bundled with the JRE
compile group: 'javax.xml.bind', name: 'jaxb-api', version: jaxbVersion
compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: jaxbVersion
compile group: 'com.google.code.gson', name: 'gson', version: gsonVersion
}
task createAppWithGCLogging(type: CreateStartScripts) {
applicationName = "pravega-controller-withGCLogging"
mainClassName = "io.pravega.controller.server.Main"
defaultJvmOpts = ["-server", "-Xms128m", "-XX:+HeapDumpOnOutOfMemoryError",
"-XX:+PrintGCDetails", "-XX:+PrintGCDateStamps",
"-Xloggc:PRAVEGA_APP_HOME/logs/gc.log", "-XX:+UseGCLogFileRotation",
"-XX:NumberOfGCLogFiles=2", "-XX:GCLogFileSize=64m",
"-Dconfig.file=PRAVEGA_APP_HOME/conf/controller.config.properties",
"-Dlogback.configurationFile=PRAVEGA_APP_HOME/conf/logback.xml",
"-Dlog.dir=PRAVEGA_APP_HOME/logs",
"-Dlog.name=controller"]
classpath = startScripts.classpath
outputDir = startScripts.outputDir
}
applicationDistribution.into("bin") {
from(createAppWithGCLogging)
}
}
project('cli:admin') {
apply plugin: 'application'
applicationName = "pravega-admin"
mainClassName = "io.pravega.cli.admin.AdminCLIRunner"
applicationDefaultJvmArgs = ["-Dlogback.configurationFile=PRAVEGA_APP_HOME/conf/admin-cli-logback.xml",
"-Dlog.dir=PRAVEGA_APP_HOME/logs",
"-Dlog.name=adminCli"]
startScripts {
classpath += files('$APP_HOME/pluginlib')
doLast {
def scriptFile = file getUnixScript()
scriptFile.text = scriptFile.text.replace('$APP_HOME/lib/pluginlib', '$APP_HOME/pluginlib/*')
def winScriptFile = file getWindowsScript()
winScriptFile.text = winScriptFile.text.replace('%APP_HOME%\\lib\\pluginlib', '%APP_HOME%\\pluginlib\\*')
}
}
dependencies {
compile project(':common')
compile project(':controller')
compile project(':segmentstore:server')
compile project(':segmentstore:storage')
compile project(':segmentstore:server:host')
compile project(':segmentstore:storage:impl')
compile project(':shared:cluster')
compile project(":shared:security")
compile project(':test:testcommon')
compile project(':test:integration')
compile group: 'org.apache.bookkeeper', name: 'bookkeeper-common', version: bookKeeperVersion
compile group: 'org.apache.curator', name: 'curator-framework', version: apacheCuratorVersion
compile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.apache.bookkeeper', name: 'bookkeeper-common', version: bookKeeperVersion, classifier: 'tests'
testCompile group: 'org.apache.bookkeeper', name: 'bookkeeper-server', version: bookKeeperVersion, classifier: 'tests'
testCompile group: 'org.apache.zookeeper', name: 'zookeeper', version: apacheZookeeperVersion, classifier: 'tests'
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('cli:user') {
apply plugin: 'application'
applicationName = "pravega-cli"
mainClassName = "io.pravega.cli.user.UserCLIRunner"
startScripts {
classpath += files('$APP_HOME/pluginlib')
doLast {
def scriptFile = file getUnixScript()
scriptFile.text = scriptFile.text.replace('$APP_HOME/lib/pluginlib', '$APP_HOME/pluginlib/*')
def winScriptFile = file getWindowsScript()
winScriptFile.text = winScriptFile.text.replace('%APP_HOME%\\lib\\pluginlib', '%APP_HOME%\\pluginlib\\*')
}
}
dependencies {
compile project(':common')
compile project(':client')
compile project(':shared:protocol')
compile project(':test:testcommon')
compile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
compile group: 'com.google.code.gson', name: 'gson', version: gsonVersion
testCompile project(':test:integration')
testCompile group: 'junit', name: 'junit', version: '4.12'
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
}
project('standalone') {
apply plugin: 'application'
applicationName = "pravega-standalone"
mainClassName = "io.pravega.local.LocalPravegaEmulator"
applicationDefaultJvmArgs = ["-server", "-Xmx4g", "-XX:+HeapDumpOnOutOfMemoryError",
"-Dlogback.configurationFile=PRAVEGA_APP_HOME/conf/standalone-logback.xml",
"-Dsinglenode.configurationFile=PRAVEGA_APP_HOME/conf/standalone-config.properties",
"-Dlog.dir=PRAVEGA_APP_HOME/logs",
"-Dlog.name=pravega",
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:+JDWP_DEFAULT_PORT"]
tasks.withType(CreateStartScripts) {
def tplName = 'unixApplicationStartupScript.txt'
unixStartScriptGenerator.template = resources.text.fromFile(tplName)
}
startScripts {
classpath += files('$APP_HOME/pluginlib')
doLast {
def scriptFile = file getUnixScript()
scriptFile.text = scriptFile.text.replace('$APP_HOME/lib/pluginlib', '$APP_HOME/pluginlib/*')
def winScriptFile = file getWindowsScript()
winScriptFile.text = winScriptFile.text.replace('%APP_HOME%\\lib\\pluginlib', '%APP_HOME%\\pluginlib\\*')
}
}
dependencies {
runtimeOnly group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
compile project(':common')
compile project(':client')
compile project(':segmentstore:server')
compile project(':segmentstore:server:host')
compile project(':controller')
compile project(':segmentstore:contracts')
compile project(':segmentstore:storage')
compile project(':segmentstore:storage:impl')
compile project(':bindings')
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: jerseyVersion
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: javaxwsrsApiVersion
compile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
// https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common
compile group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion, withoutLogger
compile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: hadoopVersion, withoutLogger
compile group: 'org.apache.hadoop', name: 'hadoop-minicluster', version: hadoopVersion, withoutLogger
compile group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: nettyBoringSSLVersion
compile group: 'io.jsonwebtoken', name: 'jjwt', version: jjwtVersion
testCompile project(':test:testcommon')
testCompile project(path:':common', configuration:'testRuntime')
testCompile project(path:':segmentstore:server', configuration:'testRuntime')