-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
96 lines (85 loc) · 4.18 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
import sbt.ExclusionRule
import sbt.Keys._
name := "spark_codebase"
version := "1.0"
scalaVersion := "2.10.5"
resolvers ++= Seq(
"Typesafe repository snapshots" at "http://repo.typesafe.com/typesafe/snapshots/",
"Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/",
"Sonatype repo" at "https://oss.sonatype.org/content/groups/scala-tools/",
"Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases",
"Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
"Sonatype staging" at "http://oss.sonatype.org/content/repositories/staging",
"Java.net Maven2 Repository" at "http://download.java.net/maven/2/",
"Twitter Repository" at "http://maven.twttr.com",
"Websudos releases" at "http://maven.websudos.co.uk/ext-release-local"
)
val sparkVersion = "1.3.0"
val PhantomVersion = "1.6.0"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion % "provided"
exclude("org.apache.zookeeper", "zookeeper"),
"org.apache.spark" %% "spark-streaming" % sparkVersion % "provided",
"org.apache.spark" %% "spark-sql" %sparkVersion % "provided",
"org.apache.spark" %% "spark-streaming-kafka" % sparkVersion
exclude("org.apache.zookeeper", "zookeeper"),
"org.apache.spark" %% "spark-streaming-twitter" % sparkVersion,
"org.apache.spark" %% "spark-streaming-kinesis-asl" % sparkVersion
excludeAll ExclusionRule(organization = "org.apache.spark", name = "spark-streaming_2.10"),
"org.slf4j" % "slf4j-api" % "1.7.12",
"org.apache.kafka" %% "kafka" % "0.8.2.1"
exclude("javax.jms", "jms")
exclude("com.sun.jdmk", "jmxtools")
exclude("com.sun.jmx", "jmxri")
exclude("log4j", "log4j")
exclude("org.apache.zookeeper", "zookeeper")
exclude("com.101tec", "zkclient")
excludeAll ExclusionRule(organization = "org.slf4j"),
"org.apache.curator" % "curator-test" % "2.4.0"
excludeAll ExclusionRule(organization = "io.netty")
excludeAll ExclusionRule(organization = "org.jboss.netty")
exclude("com.google.guava", "guava"),
"com.101tec" % "zkclient" % "0.4"
exclude("org.apache.zookeeper", "zookeeper"),
"joda-time" % "joda-time" % "2.7",
"com.maxmind.geoip2" % "geoip2" % "2.1.0"
exclude("org.apache.httpcomponents", "httpclient"),
"com.websudos" %% "phantom-dsl" % PhantomVersion
exclude("com.google.guava", "guava"),
"com.websudos" %% "phantom-zookeeper" % PhantomVersion
exclude("com.google.guava", "guava")
excludeAll ExclusionRule(organization = "io.netty")
excludeAll ExclusionRule(organization = "org.jboss.netty")
excludeAll ExclusionRule(organization = "org.slf4j"),
"com.typesafe" % "config" % "1.2.1",
"com.google.guava" % "guava" % "16.0.1",
// Test dependencies
"org.scalatest" %% "scalatest" % "2.2.4" % "test",
"org.xerial.snappy" % "snappy-java" % "1.1.1.7"
)
// Cannot run tests in parallel because of:
// `akka.actor.InvalidActorNameException: actor name [LocalBackendActor] is not unique!`
parallelExecution in Test := false
// Forking is required as testing requires multiple threads
fork in Test := true
// Skip running tests during assembly
test in assembly := {}
assemblyMergeStrategy in assembly := {
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.first
case PathList(ps @ _*) if ps.last endsWith ".html" => MergeStrategy.first
case PathList("com", "google", "common", "base", xs @ _*) => MergeStrategy.first
case "application.conf" => MergeStrategy.concat
case "com/twitter/common/args/apt/cmdline.arg.info.txt.1" => MergeStrategy.first
case "org/apache/spark/unused/UnusedStubClass.class" => MergeStrategy.first
case "log4j.properties" => MergeStrategy.first
case "reference.conf" => MergeStrategy.concat
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
assemblyExcludedJars in assembly <<= (fullClasspath in assembly) map { cp =>
val excludes = Set(
"commons-httpclient-3.1.jar"
)
cp filter { jar => excludes(jar.data.getName) }
}