@@ -2,13 +2,14 @@ import sbt._
2
2
import Keys ._
3
3
import sbtassembly .Plugin ._
4
4
import AssemblyKeys ._
5
+ import com .jsuereth .pgp .sbtplugin .PgpKeys ._
5
6
6
7
object SparkBuild extends Build {
7
8
// Hadoop version to build against. For example, "0.20.2", "0.20.205.0", or
8
9
// "1.0.1" for Apache releases, or "0.20.2-cdh3u3" for Cloudera Hadoop.
9
10
val HADOOP_VERSION = " 0.20.205.0"
10
11
11
- lazy val root = Project (" root" , file(" ." ), settings = sharedSettings ) aggregate(core, repl, examples, bagel)
12
+ lazy val root = Project (" root" , file(" ." ), settings = rootSettings ) aggregate(core, repl, examples, bagel)
12
13
13
14
lazy val core = Project (" core" , file(" core" ), settings = coreSettings)
14
15
@@ -20,19 +21,62 @@ object SparkBuild extends Build {
20
21
21
22
def sharedSettings = Defaults .defaultSettings ++ Seq (
22
23
organization := " org.spark-project" ,
23
- version := " 0.5.1-SNAPSHOT " ,
24
- scalaVersion := " 2.9.1 " ,
24
+ version := " 0.5.1" ,
25
+ scalaVersion := " 2.9.2 " ,
25
26
scalacOptions := Seq (/* "-deprecation",*/ " -unchecked" , " -optimize" ), // -deprecation is too noisy due to usage of old Hadoop API, enable it once that's no longer an issue
26
27
unmanagedJars in Compile <<= baseDirectory map { base => (base / " lib" ** " *.jar" ).classpath },
27
28
retrieveManaged := true ,
28
29
transitiveClassifiers in Scope .GlobalScope := Seq (" sources" ),
29
30
testListeners <<= target.map(t => Seq (new eu.henkelmann.sbt.JUnitXmlTestsListener (t.getAbsolutePath))),
30
- publishTo <<= baseDirectory { base => Some ( Resolver .file( " Local " , base / " target " / " maven " asFile)( Patterns ( true , Resolver .mavenStyleBasePattern))) },
31
+
31
32
libraryDependencies ++= Seq (
32
33
" org.eclipse.jetty" % " jetty-server" % " 7.5.3.v20111011" ,
33
34
" org.scalatest" %% " scalatest" % " 1.6.1" % " test" ,
34
35
" org.scalacheck" %% " scalacheck" % " 1.9" % " test"
35
36
),
37
+
38
+ parallelExecution := false ,
39
+
40
+ /* Sonatype publishing settings */
41
+ resolvers ++= Seq (" sonatype-snapshots" at " https://oss.sonatype.org/content/repositories/snapshots" ,
42
+ " sonatype-staging" at " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ),
43
+ publishMavenStyle := true ,
44
+ useGpg in Global := true ,
45
+ pomExtra := (
46
+ <url >http:// spark- project.org/</ url>
47
+ <licenses >
48
+ <license >
49
+ <name >BSD License </name >
50
+ <url >https:// github.com/ mesos/ spark/ blob/ master/ LICENSE </url >
51
+ <distribution >repo</distribution >
52
+ </license >
53
+ </licenses >
54
+ <scm >
55
+ <connection >scm: git: git@ github.com: mesos/ spark.git</connection >
56
+ <url >scm: git: git@ github.com: mesos/ spark.git</url >
57
+ </scm >
58
+ <developers >
59
+ <developer >
60
+ <id >matei</id >
61
+ <name >Matei Zaharia </name >
62
+ <email >matei.zaharia@ gmail.com</email >
63
+ <url >http:// www.cs.berkeley.edu/~ matei</url >
64
+ <organization >U .C . Berkeley Computer Science </organization >
65
+ <organizationUrl >http:// www.cs.berkeley.edu/</ organizationUrl>
66
+ </developer >
67
+ </developers >
68
+ ),
69
+
70
+ publishTo <<= version { (v : String ) =>
71
+ val nexus = " https://oss.sonatype.org/"
72
+ if (v.trim.endsWith(" SNAPSHOT" ))
73
+ Some (" sonatype-snapshots" at nexus + " content/repositories/snapshots" )
74
+ else
75
+ Some (" sonatype-staging" at nexus + " service/local/staging/deploy/maven2" )
76
+ },
77
+
78
+ credentials += Credentials (Path .userHome / " .sbt" / " sonatype.credentials" ),
79
+
36
80
/* Workaround for issue #206 (fixed after SBT 0.11.0) */
37
81
watchTransitiveSources <<= Defaults .inDependencies[Task [Seq [File ]]](watchSources.task,
38
82
const(std.TaskExtra .constant(Nil )), aggregate = true , includeRoot = true ) apply { _.join.map(_.flatten) }
@@ -59,10 +103,15 @@ object SparkBuild extends Build {
59
103
" de.javakaffee" % " kryo-serializers" % " 0.9" ,
60
104
" org.jboss.netty" % " netty" % " 3.2.6.Final" ,
61
105
" it.unimi.dsi" % " fastutil" % " 6.4.2" ,
62
- " colt" % " colt" % " 1.2.0"
106
+ " colt" % " colt" % " 1.2.0" ,
107
+ " org.apache.mesos" % " mesos" % " 0.9.0-incubating"
63
108
)
64
109
) ++ assemblySettings ++ Seq (test in assembly := {})
65
110
111
+ def rootSettings = sharedSettings ++ Seq (
112
+ publish := {}
113
+ )
114
+
66
115
def replSettings = sharedSettings ++ Seq (
67
116
name := " spark-repl" ,
68
117
libraryDependencies <+= scalaVersion(" org.scala-lang" % " scala-compiler" % _)
0 commit comments