This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
/
build.sbt
177 lines (146 loc) · 6.45 KB
/
build.sbt
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
// import SparkShim._
scalaVersion in ThisBuild := "2.11.8"
crossScalaVersions := Seq("2.10.5", "2.11.8")
parallelExecution in Test := false
val nscalaVersion = "2.12.0"
val scalatestVersion = "2.2.4"
val httpclientVersion = "4.5"
val json4sVersion = "3.2.10"
val sparkdateTimeVersion = "0.0.3"
val scoptVersion = "3.3.0"
val druidVersion = "0.9.1"
val sparkVersion = "2.0.2"
val guava_version = "16.0.1"
val derbyVersion = "10.11.1.1"
val jettyVersion = "9.2.16.v20160414"
val jacksonVersion = "2.6.5"
val sparkDependencies = Seq(
"com.google.guava" % "guava" % guava_version % "provided" force(),
"org.apache.derby" % "derby" % derbyVersion % "provided" force(),
"org.apache.spark" %% "spark-core" % sparkVersion % "provided",
"org.apache.spark" %% "spark-sql" % sparkVersion % "provided",
"org.apache.spark" %% "spark-hive" % sparkVersion % "provided",
"org.apache.spark" %% "spark-hive-thriftserver" % sparkVersion % "provided",
"org.eclipse.jetty" % "jetty-http" % jettyVersion % "provided",
"org.eclipse.jetty" % "jetty-continuation" % jettyVersion % "provided",
"org.eclipse.jetty" % "jetty-servlet" % jettyVersion % "provided",
"org.eclipse.jetty" % "jetty-servlets" % jettyVersion % "provided",
"org.eclipse.jetty" % "jetty-util" % jettyVersion % "provided",
"org.eclipse.jetty" % "jetty-security" % jettyVersion % "provided",
"org.eclipse.jetty" % "jetty-plus" % jettyVersion % "provided",
"org.eclipse.jetty" % "jetty-server" % jettyVersion % "provided"
)
val coreDependencies = Seq(
"com.github.nscala-time" %% "nscala-time" % nscalaVersion,
"org.apache.httpcomponents" % "httpclient" % httpclientVersion,
// "org.json4s" %% "json4s-native" % json4sVersion,
"org.json4s" %% "json4s-ext" % json4sVersion,
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-smile" % jacksonVersion,
"com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-smile-provider" % jacksonVersion,
"com.sparklinedata" %% "spark-datetime" % sparkdateTimeVersion,
"com.github.scopt" %% "scopt" % scoptVersion,
"org.scalatest" %% "scalatest" % scalatestVersion % "test"
)
val coreTestDependencies = Seq(
"org.scalatest" %% "scalatest" % scalatestVersion % "test",
"org.pegdown" % "pegdown" % "1.6.0" % "test",
"com.databricks" %% "spark-csv" % "1.1.0" % "test"
)
val druidTestEnvDependencies =Seq(
"com.google.guava" % "guava" % guava_version force(),
"org.apache.derby" % "derby" % derbyVersion force(),
"org.apache.derby" % "derbyclient" % derbyVersion force(),
"org.apache.derby" % "derbynet" % derbyVersion force(),
"com.sun.jersey" % "jersey-servlet" % "1.17.1" % "test" force(),
"com.metamx" %% "scala-util" % "1.11.6" exclude("log4j", "log4j") force(),
"com.metamx" % "java-util" % "0.27.9" exclude("log4j", "log4j") force(),
"io.druid" % "druid-server" % druidVersion,
"io.druid" % "druid-services" % druidVersion,
"org.apache.curator" % "curator-test" % "2.4.0" % "test" exclude("log4j", "log4j") force(),
"io.druid.extensions" % "druid-datasketches" % druidVersion,
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-smile" % jacksonVersion force(),
"com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion force(),
"com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-smile-provider" % jacksonVersion force(),
"com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-base" % jacksonVersion force(),
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion force(),
"com.fasterxml.jackson.core" % "jackson-annotations" % jacksonVersion force(),
"com.fasterxml.jackson.module" % "jackson-module-jaxb-annotations" % jacksonVersion force()
)
lazy val commonSettings = Seq(
organization := "com.sparklinedata",
version := "0.5.0-SNAPSHOT",
javaOptions := Seq("-Xms1g", "-Xmx3g",
"-Duser.timezone=UTC",
"-Dscalac.patmat.analysisBudget=512",
"-XX:MaxPermSize=256M"),
// Target Java 7
scalacOptions += "-target:jvm-1.8",
javacOptions in compile ++= Seq("-source", "1.8", "-target", "1.8"),
scalacOptions := Seq("-feature", "-deprecation"
//, "-Ylog-classpath"
),
dependencyOverrides := Set(
"org.apache.commons" % "commons-lang3" % "3.3.2"
),
licenses := Seq("Apache License, Version 2.0" ->
url("http://www.apache.org/licenses/LICENSE-2.0")
),
homepage := Some(url("https://github.com/SparklineData/spark-druid-olap")),
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT")) {
Some("snapshots" at nexus + "content/repositories/snapshots")
}
else {
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
},
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
test in assembly := {},
useGpg := true,
usePgpKeyHex("C922EB45"),
pomExtra := (
<scm>
<url>https://github.com/SparklineData/spark-druid-olap.git</url>
<connection>scm:git:[email protected]:SparklineData/spark-druid-olap.git</connection>
</scm>
<developers>
<developer>
<name>Harish Butani</name>
<organization>SparklineData</organization>
<organizationUrl>http://sparklinedata.com/</organizationUrl>
</developer>
<developer>
<name>John Pullokkaran</name>
<organization>SparklineData</organization>
<organizationUrl>http://sparklinedata.com/</organizationUrl>
</developer>
</developers>),
fork in Test := false,
parallelExecution in Test := false
) ++ releaseSettings ++ Seq(
ReleaseKeys.publishArtifactsAction := PgpKeys.publishSigned.value
)
lazy val druidTestEnv = project.in(file("druidTestEnv"))
.settings(
libraryDependencies ++= (coreTestDependencies ++ druidTestEnvDependencies)
)
lazy val root = project.in(file("."))
.settings(commonSettings: _*)
.settings(
name := s"spl-accel",
libraryDependencies ++= (sparkDependencies ++ coreDependencies ++ coreTestDependencies),
assemblyOption in assembly :=
(assemblyOption in assembly).value.copy(includeScala = false),
assemblyExcludedJars in assembly := {
val cp = (fullClasspath in assembly).value
cp filter {d => d.data.getName.startsWith("joda") || d.data.getName.startsWith("derby")}
},
publishArtifact in (Compile, packageBin) := false,
publishArtifact in Test := true,
testOptions in Test += Tests.Argument("-h", "target/html")
)
.settings(addArtifact(artifact in (Compile, assembly), assembly).settings: _*)
.dependsOn(druidTestEnv % "test->test")