forked from lucidworks/hive-solr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
171 lines (145 loc) · 3.91 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
buildscript {
repositories {
jcenter()
}
dependencies {
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '1.2.4'
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4.1'
}
defaultTasks 'dist'
ext {
publishedProjects = subprojects - project(':solr-hadoop-common')
}
subprojects {
if (project in publishedProjects) {
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'java'
apply plugin: 'project-report'
apply plugin: 'jacoco'
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
test {
reports.html.destination = file("$buildDir/reports/tests")
reports.junitXml.destination = file("$buildDir/test-results")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}
publishing {
publications {
core(MavenPublication) {
from components.java
}
}
}
task dist(dependsOn: "publishToMavenLocal") {
}
}
}
project('solr-hive-core') {
dependencies {
compile(project(':solr-hadoop-common:solr-hadoop-io')) {
transitive = false
}
compile("org.apache.hive:hive-common:${hiveVersion}") {
transitive = false
}
compile("org.apache.hive:hive-exec:${hiveVersion}") {
transitive = false
}
compile("org.apache.solr:solr-solrj:${solrVersion}") {
exclude group: 'org.apache.hadoop'
exclude group: 'junit'
}
compile("org.apache.hadoop:hadoop-common:${hadoop2Version}@jar")
compile("org.apache.hadoop:hadoop-client:${hadoop2Version}") {
exclude group: 'log4j'
exclude group: 'org.slf4j'
}
compile("org.apache.hadoop:hadoop-auth:${hadoop2Version}") {
transitive = false
}
compile("org.apache.hadoop:hadoop-mapreduce-client-core:${hadoop2Version}") {
transitive = false
}
compile("org.apache.hadoop:hadoop-hdfs:${hadoop2Version}@jar") {
transitive = false
}
testCompile 'com.carrotsearch.randomizedtesting:junit4-ant:1.4.0'
testCompile "org.apache.lucene:lucene-analyzers-common:${solrVersion}"
testCompile "commons-collections:commons-collections:3.2.1"
testCompile ("org.apache.solr:solr-test-framework:${solrVersion}") {
exclude group: 'junit'
}
testCompile "org.apache.mrunit:mrunit:1.0.0:hadoop2@jar"
testCompile "com.klarna:hiverunner:3.2.0"
testCompile "junit:junit:4.12"
testCompile (project(':solr-hadoop-common:solr-hadoop-testbase')) {
transitive = false
}
testCompile(project(':solr-hadoop-common:solr-hadoop-document')) {
transitive = false
}
}
}
project('solr-hive-serde') {
apply plugin: 'com.github.johnrengelman.shadow'
shadowJar {
zip64 true
mergeServiceFiles()
classifier = ''
dependencies {
exclude(dependency("org.apache.hadoop:.*"))
exclude(dependency("org.apache.hive:.*"))
}
relocate 'org.apache.http', 'shaded.org.apache.http'
relocate 'org.apache.solr', 'shaded.org.apache.solr'
// Shade guava due Tez conflicts
relocate 'com.google.common', 'shaded.com.google.common'
// Remove unwanted files in root jar (repackaging)
exclude 'JDOMAbout*.class'
exclude '.gitkeep'
exclude '*.txt'
exclude '*.dtd'
exclude '*.gif'
exclude '*.properties'
exclude '*.xml'
exclude '*.ico'
exclude '*.lst'
exclude '*.css'
exclude 'NOTICE'
exclude 'JHIGHLIGHT_VERSION'
exclude 'LICENSE'
}
dependencies {
compile(project(':solr-hive-core'))
compile(project(':solr-hadoop-common:solr-hadoop-document')) {
transitive = false
}
}
publishing {
publications {
shadow(MavenPublication) {
from components.shadow
}
}
}
}