-
Notifications
You must be signed in to change notification settings - Fork 117
/
build.sbt
117 lines (97 loc) · 3.97 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
import AssemblyKeys._
assemblySettings
name := "keystoneml"
version := "0.3.0-SNAPSHOT"
organization := "edu.berkeley.cs.amplab"
licenses := Seq("Apache 2.0" -> url("https://raw.githubusercontent.com/amplab/keystone/master/LICENSE"))
homepage := Some(url("http://keystone-ml.org"))
crossScalaVersions := Seq("2.11.8", "2.10.6")
parallelExecution in Test := false
libraryDependencies ++= Seq(
"edu.arizona.sista" % "processors" % "3.0" exclude("ch.qos.logback", "logback-classic"),
"edu.arizona.sista" % "processors" % "3.0" classifier "models",
"org.slf4j" % "slf4j-api" % "1.7.2",
"org.slf4j" % "slf4j-log4j12" % "1.7.2",
"org.scalatest" %% "scalatest" % "1.9.1" % "test",
"org.mockito" % "mockito-core" % "1.8.5",
"org.apache.commons" % "commons-compress" % "1.7",
"commons-io" % "commons-io" % "2.4",
"org.scalanlp" %% "breeze" % "0.12",
"com.google.guava" % "guava" % "14.0.1",
"com.github.fommil.netlib" % "all" % "1.1.2" pomOnly(),
"com.github.scopt" %% "scopt" % "3.3.0"
)
{
val defaultSparkVersion = "2.1.0"
val sparkVersion =
scala.util.Properties.envOrElse("SPARK_VERSION", defaultSparkVersion)
val excludeHadoop = ExclusionRule(organization = "org.apache.hadoop")
val excludeSpark = ExclusionRule(organization = "org.apache.spark")
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkVersion excludeAll(excludeHadoop),
"org.apache.spark" %% "spark-mllib" % sparkVersion excludeAll(excludeHadoop),
"org.apache.spark" %% "spark-sql" % sparkVersion excludeAll(excludeHadoop),
"edu.berkeley.cs.amplab" %% "mlmatrix" % "0.2" excludeAll(excludeHadoop, excludeSpark)
)
}
{
val defaultHadoopVersion = "2.6.0"
val hadoopVersion =
scala.util.Properties.envOrElse("SPARK_HADOOP_VERSION", defaultHadoopVersion)
libraryDependencies += "org.apache.hadoop" % "hadoop-client" % hadoopVersion
}
resolvers ++= Seq(
"Local Maven Repository" at Path.userHome.asFile.toURI.toURL + ".m2/repository",
"Typesafe" at "http://repo.typesafe.com/typesafe/releases",
"Cloudera Repository" at "https://repository.cloudera.com/artifactory/cloudera-repos/",
"Spray" at "http://repo.spray.cc"
)
resolvers += Resolver.sonatypeRepo("public")
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.first
case PathList(ps @ _*) if ps.last endsWith ".html" => MergeStrategy.first
case "application.conf" => MergeStrategy.concat
case "reference.conf" => MergeStrategy.concat
case "log4j.properties" => MergeStrategy.first
case m if m.toLowerCase.endsWith("manifest.mf") => MergeStrategy.discard
case m if m.toLowerCase.matches("meta-inf.*\\.sf$") => MergeStrategy.discard
case m if m.toLowerCase.startsWith("meta-inf/services/") => MergeStrategy.filterDistinctLines
case _ => MergeStrategy.first
}
}
test in assembly := {}
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
publishMavenStyle := true
publishArtifact in Test := false
// To publish on maven-central, all required artifacts must also be hosted on maven central.
pomIncludeRepository := { _ => false }
pomExtra := (
<scm>
<url>[email protected]:amplab/keystone.git</url>
<connection>scm:git:[email protected]:amplab/keystone.git</connection>
</scm>
<developers>
<developer>
<id>etrain</id>
<name>Evan Sparks</name>
<url>http://etrain.github.io/about.html</url>
</developer>
<developer>
<id>shivaram</id>
<name>Shivaram Venkataraman</name>
<url>http://shivaram.org</url>
</developer>
<developer>
<id>tomerk</id>
<name>Tomer Kaftan</name>
<url>https://github.com/tomerk</url>
</developer>
</developers>
)