-
Notifications
You must be signed in to change notification settings - Fork 703
/
Build.scala
161 lines (138 loc) · 5.3 KB
/
Build.scala
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
package scalding
import sbt._
import Keys._
import sbtassembly.Plugin._
import AssemblyKeys._
import sbtgitflow.ReleasePlugin._
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys._
import scala.collection.JavaConverters._
object ScaldingBuild extends Build {
val sharedSettings = Project.defaultSettings ++ assemblySettings ++
releaseSettings ++ Seq(
organization := "com.twitter",
//TODO: Change to 2.10.* when Twitter moves to Scala 2.10 internally
scalaVersion := "2.9.2",
crossScalaVersions := Seq("2.9.2", "2.10.0"),
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.10.0" % "test",
"org.scala-tools.testing" %% "specs" % "1.6.9" % "test"
),
resolvers ++= Seq(
"snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
"releases" at "http://oss.sonatype.org/content/repositories/releases",
"Concurrent Maven Repo" at "http://conjars.org/repo"
),
parallelExecution in Test := false,
scalacOptions ++= Seq("-unchecked", "-deprecation"),
// Uncomment if you don't want to run all the tests before building assembly
// test in assembly := {},
// Publishing options:
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { x => false },
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("sonatype-snapshots" at nexus + "content/repositories/snapshots")
else
Some("sonatype-releases" at nexus + "service/local/staging/deploy/maven2")
},
// Janino includes a broken signature, and is not needed:
excludedJars in assembly <<= (fullClasspath in assembly) map { cp =>
val excludes = Set("jsp-api-2.1-6.1.14.jar", "jsp-2.1-6.1.14.jar",
"jasper-compiler-5.5.12.jar", "janino-2.5.16.jar")
cp filter { jar => excludes(jar.data.getName)}
},
// Some of these files have duplicates, let's ignore:
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case s if s.endsWith(".class") => MergeStrategy.last
case s if s.endsWith("project.clj") => MergeStrategy.concat
case s if s.endsWith(".html") => MergeStrategy.last
case x => old(x)
}
},
pomExtra := (
<url>https://github.com/twitter/scalding</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<scm>
<url>git@github.com:twitter/scalding.git</url>
<connection>scm:git:git@github.com:twitter/scalding.git</connection>
</scm>
<developers>
<developer>
<id>posco</id>
<name>Oscar Boykin</name>
<url>http://twitter.com/posco</url>
</developer>
<developer>
<id>avibryant</id>
<name>Avi Bryant</name>
<url>http://twitter.com/avibryant</url>
</developer>
<developer>
<id>argyris</id>
<name>Argyris Zymnis</name>
<url>http://twitter.com/argyris</url>
</developer>
</developers>)
) ++ mimaDefaultSettings
lazy val scalding = Project(
id = "scalding",
base = file("."),
settings = sharedSettings ++ DocGen.publishSettings
).settings(
test := { },
publish := { }, // skip publishing for this root project.
publishLocal := { }
).aggregate(scaldingArgs, scaldingDate, scaldingCore)
lazy val scaldingArgs = Project(
id = "scalding-args",
base = file("scalding-args"),
settings = sharedSettings
).settings(
name := "scalding-args",
previousArtifact := Some("com.twitter" % "scalding-args_2.9.2" % "0.8.4")
)
lazy val scaldingDate = Project(
id = "scalding-date",
base = file("scalding-date"),
settings = sharedSettings
).settings(
name := "scalding-date",
previousArtifact := Some("com.twitter" % "scalding-date_2.9.2" % "0.8.4"),
libraryDependencies += "com.joestelmach" % "natty" % "0.7"
)
lazy val cascadingVersion = System.getenv.asScala.getOrElse("SCALDING_CASCADING_VERSION", "2.1.5")
lazy val scaldingCore = Project(
id = "scalding-core",
base = file("scalding-core"),
settings = sharedSettings
).settings(
name := "scalding-core",
previousArtifact := Some("com.twitter" % "scalding-core_2.9.2" % "0.8.4"),
libraryDependencies ++= Seq(
"cascading" % "cascading-core" % cascadingVersion,
"cascading" % "cascading-local" % cascadingVersion,
"cascading" % "cascading-hadoop" % cascadingVersion,
"cascading.kryo" % "cascading.kryo" % "0.4.6",
"com.twitter" % "maple" % "0.2.5",
"com.twitter" %% "chill" % "0.2.0",
"com.twitter" %% "algebird-core" % "0.1.12",
"commons-io" % "commons-io" % "2.4",
"commons-lang" % "commons-lang" % "2.4",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.1.3",
"org.apache.hadoop" % "hadoop-core" % "0.20.2" % "provided",
"org.slf4j" % "slf4j-api" % "1.6.6",
"org.slf4j" % "slf4j-log4j12" % "1.6.6" % "provided"
)
).dependsOn(scaldingArgs, scaldingDate)
}