aboutsummaryrefslogtreecommitdiff
path: root/project/SparkBuild.scala
diff options
context:
space:
mode:
authorMosharaf Chowdhury <mosharaf@cs.berkeley.edu>2012-10-02 22:25:39 -0700
committerMosharaf Chowdhury <mosharaf@cs.berkeley.edu>2012-10-02 22:25:39 -0700
commit119e50c7b9e50a388648ca9434ee1ace5c22867c (patch)
tree8034c682495abac953749ec657f9f5f040d5d123 /project/SparkBuild.scala
parent31ffe8d5284a4cda5eb8d21d3ea042cc5a2dc8b7 (diff)
parentff813e43809c3598f7ec46f7f562bc4952cfe54c (diff)
downloadspark-119e50c7b9e50a388648ca9434ee1ace5c22867c.tar.gz
spark-119e50c7b9e50a388648ca9434ee1ace5c22867c.tar.bz2
spark-119e50c7b9e50a388648ca9434ee1ace5c22867c.zip
Conflict fixed
Diffstat (limited to 'project/SparkBuild.scala')
-rw-r--r--project/SparkBuild.scala35
1 files changed, 24 insertions, 11 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 203001954a..d007d8519e 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -1,4 +1,5 @@
import sbt._
+import sbt.Classpaths.publishTask
import Keys._
import sbtassembly.Plugin._
import AssemblyKeys._
@@ -19,10 +20,14 @@ object SparkBuild extends Build {
lazy val bagel = Project("bagel", file("bagel"), settings = bagelSettings) dependsOn (core)
+ // A configuration to set an alternative publishLocalConfiguration
+ lazy val MavenCompile = config("m2r") extend(Compile)
+ lazy val publishLocalBoth = TaskKey[Unit]("publish-local", "publish local for m2 and ivy")
+
def sharedSettings = Defaults.defaultSettings ++ Seq(
organization := "org.spark-project",
version := "0.6.0-SNAPSHOT",
- scalaVersion := "2.9.1",
+ scalaVersion := "2.9.2",
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
unmanagedJars in Compile <<= baseDirectory map { base => (base / "lib" ** "*.jar").classpath },
retrieveManaged := true,
@@ -38,7 +43,15 @@ object SparkBuild extends Build {
parallelExecution := false,
/* Workaround for issue #206 (fixed after SBT 0.11.0) */
watchTransitiveSources <<= Defaults.inDependencies[Task[Seq[File]]](watchSources.task,
- const(std.TaskExtra.constant(Nil)), aggregate = true, includeRoot = true) apply { _.join.map(_.flatten) }
+ const(std.TaskExtra.constant(Nil)), aggregate = true, includeRoot = true) apply { _.join.map(_.flatten) },
+
+ otherResolvers := Seq(Resolver.file("dotM2", file(Path.userHome + "/.m2/repository"))),
+ publishLocalConfiguration in MavenCompile <<= (packagedArtifacts, deliverLocal, ivyLoggingLevel) map {
+ (arts, _, level) => new PublishConfiguration(None, "dotM2", arts, Seq(), level)
+ },
+ publishMavenStyle in MavenCompile := true,
+ publishLocal in MavenCompile <<= publishTask(publishLocalConfiguration in MavenCompile, deliverLocal),
+ publishLocalBoth <<= Seq(publishLocal in MavenCompile, publishLocal).dependOn
)
val slf4jVersion = "1.6.1"
@@ -48,8 +61,8 @@ object SparkBuild extends Build {
resolvers ++= Seq(
"Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
"JBoss Repository" at "http://repository.jboss.org/nexus/content/repositories/releases/",
- "Cloudera Repository" at "http://repository.cloudera.com/artifactory/cloudera-repos/",
- "Spray Repository" at "http://repo.spray.cc/"
+ "Spray Repository" at "http://repo.spray.cc/",
+ "Cloudera Repository" at "http://repository.cloudera.com/artifactory/cloudera-repos/"
),
libraryDependencies ++= Seq(
"com.google.guava" % "guava" % "11.0.1",
@@ -61,9 +74,9 @@ object SparkBuild extends Build {
"asm" % "asm-all" % "3.3.1",
"com.google.protobuf" % "protobuf-java" % "2.4.1",
"de.javakaffee" % "kryo-serializers" % "0.9",
- "com.typesafe.akka" % "akka-actor" % "2.0.2",
- "com.typesafe.akka" % "akka-remote" % "2.0.2",
- "com.typesafe.akka" % "akka-slf4j" % "2.0.2",
+ "com.typesafe.akka" % "akka-actor" % "2.0.3",
+ "com.typesafe.akka" % "akka-remote" % "2.0.3",
+ "com.typesafe.akka" % "akka-slf4j" % "2.0.3",
"it.unimi.dsi" % "fastutil" % "6.4.4",
"colt" % "colt" % "1.2.0",
"cc.spray" % "spray-can" % "1.0-M2.1",
@@ -74,7 +87,7 @@ object SparkBuild extends Build {
def replSettings = sharedSettings ++ Seq(
name := "spark-repl",
libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _)
- ) ++ assemblySettings ++ extraAssemblySettings
+ )
def examplesSettings = sharedSettings ++ Seq(
name := "spark-examples"
@@ -83,11 +96,11 @@ object SparkBuild extends Build {
def bagelSettings = sharedSettings ++ Seq(name := "spark-bagel")
def extraAssemblySettings() = Seq(test in assembly := {}) ++ Seq(
- mergeStrategy in assembly := {
- case m if m.toLowerCase.endsWith("manifest.mf") => MergeStrategy.discard
+ mergeStrategy in assembly := {
+ case m if m.toLowerCase.endsWith("manifest.mf") => MergeStrategy.discard
case "reference.conf" => MergeStrategy.concat
case _ => MergeStrategy.first
}
- )
+ )
}