diff --git a/core/lib/mesos-0.9.0.jar b/core/lib/mesos-0.9.0.jar
deleted file mode 100644
index b7ad79bf2a55be73ce730869f39f9af49517d10a..0000000000000000000000000000000000000000
Binary files a/core/lib/mesos-0.9.0.jar and /dev/null differ
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 61321db3b254d7a048dca8e22ba67a03e30da1e9..5c990e58987551bb02a220bcdfb632de3ec15fd5 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -2,13 +2,14 @@ import sbt._
 import Keys._
 import sbtassembly.Plugin._
 import AssemblyKeys._
+import com.jsuereth.pgp.sbtplugin.PgpKeys._
 
 object SparkBuild extends Build {
   // Hadoop version to build against. For example, "0.20.2", "0.20.205.0", or
   // "1.0.1" for Apache releases, or "0.20.2-cdh3u3" for Cloudera Hadoop.
   val HADOOP_VERSION = "0.20.205.0"
 
-  lazy val root = Project("root", file("."), settings = sharedSettings) aggregate(core, repl, examples, bagel)
+  lazy val root = Project("root", file("."), settings = rootSettings) aggregate(core, repl, examples, bagel)
 
   lazy val core = Project("core", file("core"), settings = coreSettings)
 
@@ -20,19 +21,62 @@ object SparkBuild extends Build {
 
   def sharedSettings = Defaults.defaultSettings ++ Seq(
     organization := "org.spark-project",
-    version := "0.5.1-SNAPSHOT",
-    scalaVersion := "2.9.1",
+    version := "0.5.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,
     transitiveClassifiers in Scope.GlobalScope := Seq("sources"),
     testListeners <<= target.map(t => Seq(new eu.henkelmann.sbt.JUnitXmlTestsListener(t.getAbsolutePath))),
-    publishTo <<= baseDirectory { base => Some(Resolver.file("Local", base / "target" / "maven" asFile)(Patterns(true, Resolver.mavenStyleBasePattern))) },
+
     libraryDependencies ++= Seq(
       "org.eclipse.jetty" % "jetty-server" % "7.5.3.v20111011",
       "org.scalatest" %% "scalatest" % "1.6.1" % "test",
       "org.scalacheck" %% "scalacheck" % "1.9" % "test"
     ),
+
+    parallelExecution := false,
+
+    /* Sonatype publishing settings */
+    resolvers ++= Seq("sonatype-snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
+      "sonatype-staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2/"),
+    publishMavenStyle := true,
+    useGpg in Global := true,
+    pomExtra := (
+      <url>http://spark-project.org/</url>
+      <licenses>
+        <license>
+          <name>BSD License</name>
+          <url>https://github.com/mesos/spark/blob/master/LICENSE</url>
+          <distribution>repo</distribution>
+        </license>
+      </licenses>
+      <scm>
+        <connection>scm:git:git@github.com:mesos/spark.git</connection>
+        <url>scm:git:git@github.com:mesos/spark.git</url>
+      </scm>
+      <developers>
+        <developer>
+          <id>matei</id>
+          <name>Matei Zaharia</name>
+          <email>matei.zaharia@gmail.com</email>
+          <url>http://www.cs.berkeley.edu/~matei</url>
+          <organization>U.C. Berkeley Computer Science</organization>
+          <organizationUrl>http://www.cs.berkeley.edu/</organizationUrl>
+        </developer>
+      </developers>
+    ),
+
+    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-staging"  at nexus + "service/local/staging/deploy/maven2")
+    },
+
+    credentials += Credentials(Path.userHome / ".sbt" / "sonatype.credentials"),
+
     /* 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) }
@@ -59,10 +103,15 @@ object SparkBuild extends Build {
       "de.javakaffee" % "kryo-serializers" % "0.9",
       "org.jboss.netty" % "netty" % "3.2.6.Final",
       "it.unimi.dsi" % "fastutil" % "6.4.2",
-      "colt" % "colt" % "1.2.0"
+      "colt" % "colt" % "1.2.0",
+      "org.apache.mesos" % "mesos" % "0.9.0-incubating"
     )
   ) ++ assemblySettings ++ Seq(test in assembly := {})
 
+  def rootSettings = sharedSettings ++ Seq(
+    publish := {}
+  )
+
   def replSettings = sharedSettings ++ Seq(
     name := "spark-repl",
     libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _)
diff --git a/project/build.properties b/project/build.properties
index fdb94e61f95dbbdc95c94bb11cf86a55c85439b7..44d5d4c9ca3781c436d51e3115c22a2b2221b020 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1,2 @@
-sbt.version=0.11.1
+sbt.version=0.11.3
+scala.version=2.9.2
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 6203f4d5956e50147d27bca317b12dcfd665bb13..d9bc199ae2c441da186935c7f90f876d0fdfa7be 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,10 +1,13 @@
 resolvers ++= Seq(
   "sbt-idea-repo" at "http://mpeltonen.github.com/maven/",
-  Classpaths.typesafeResolver
+  Classpaths.typesafeResolver,
+  Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
 )
 
-addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "0.11.0")
+addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
 
-addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse" % "1.4.0")
+addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.0.0")
 
-addSbtPlugin("com.eed3si9n" %% "sbt-assembly" % "0.7.2")
+addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse" % "2.1.0-RC1")
+
+addSbtPlugin("com.eed3si9n" %% "sbt-assembly" % "0.8.3")
diff --git a/sbt/sbt-launch-0.11.1.jar b/sbt/sbt-launch-0.11.1.jar
deleted file mode 100644
index 59d325ecfe8bf3422394496d36f740263bbacb7e..0000000000000000000000000000000000000000
Binary files a/sbt/sbt-launch-0.11.1.jar and /dev/null differ
diff --git a/sbt/sbt-launch-0.11.3-2.jar b/sbt/sbt-launch-0.11.3-2.jar
new file mode 100644
index 0000000000000000000000000000000000000000..23e5c3f31149bbf2bddbf1ae8d1fd02aba7910ad
Binary files /dev/null and b/sbt/sbt-launch-0.11.3-2.jar differ