diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2012-10-01 10:57:32 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2012-10-01 10:57:32 -0700 |
commit | 22b6b16e56f5a1863398af62fd94790d6eb977b7 (patch) | |
tree | fa99143928a4bb909ff7d8a38321b1ff68da2c86 /project/SparkBuild.scala | |
parent | 0b84871dbca8a1a33407e7322e3c6162d24b4c29 (diff) | |
parent | 39363b51850af343aeb36f970e0e48884954bb53 (diff) | |
download | spark-22b6b16e56f5a1863398af62fd94790d6eb977b7.tar.gz spark-22b6b16e56f5a1863398af62fd94790d6eb977b7.tar.bz2 spark-22b6b16e56f5a1863398af62fd94790d6eb977b7.zip |
Merge branch 'dev' of github.com:mesos/spark into dev
Diffstat (limited to 'project/SparkBuild.scala')
-rw-r--r-- | project/SparkBuild.scala | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 0247b46de4..385bfd6b72 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,6 +20,10 @@ 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]("pl", "publish local for m2 and ivy") + def sharedSettings = Defaults.defaultSettings ++ Seq( organization := "org.spark-project", version := "0.6.0-SNAPSHOT", @@ -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" @@ -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 } - ) + ) } |