diff options
author | Takuya UESHIN <ueshin@happy-camper.st> | 2014-07-14 23:06:35 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-07-14 23:06:35 -0700 |
commit | e2255e4b2c404f31ac9f7af9ed445141af980973 (patch) | |
tree | 66b1f5a8c06cc06f4db0a26a4babb8113a8a406b /project/SparkBuild.scala | |
parent | 9fe693b5b6ed6af34ee1e800ab89c8a11991ea38 (diff) | |
download | spark-e2255e4b2c404f31ac9f7af9ed445141af980973.tar.gz spark-e2255e4b2c404f31ac9f7af9ed445141af980973.tar.bz2 spark-e2255e4b2c404f31ac9f7af9ed445141af980973.zip |
[SPARK-2467] Revert SparkBuild to publish-local to both .m2 and .ivy2.
Author: Takuya UESHIN <ueshin@happy-camper.st>
Closes #1398 from ueshin/issues/SPARK-2467 and squashes the following commits:
7f01d58 [Takuya UESHIN] Revert SparkBuild to publish-local to both .m2 and .ivy2.
Diffstat (limited to 'project/SparkBuild.scala')
-rw-r--r-- | project/SparkBuild.scala | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 44abbc152f..754d54e893 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -19,6 +19,7 @@ import scala.util.Properties import scala.collection.JavaConversions._ import sbt._ +import sbt.Classpaths.publishTask import sbt.Keys._ import org.scalastyle.sbt.ScalastylePlugin.{Settings => ScalaStyleSettings} import com.typesafe.sbt.pom.{PomBuild, SbtPomKeys} @@ -103,12 +104,23 @@ object SparkBuild extends PomBuild { override val userPropertiesMap = System.getProperties.toMap + lazy val MavenCompile = config("m2r") extend(Compile) + lazy val publishLocalBoth = TaskKey[Unit]("publish-local", "publish local for m2 and ivy") + lazy val sharedSettings = graphSettings ++ ScalaStyleSettings ++ Seq ( javaHome := Properties.envOrNone("JAVA_HOME").map(file), incOptions := incOptions.value.withNameHashing(true), retrieveManaged := true, retrievePattern := "[type]s/[artifact](-[revision])(-[classifier]).[ext]", - publishMavenStyle := true + publishMavenStyle := true, + + otherResolvers <<= SbtPomKeys.mvnLocalRepository(dotM2 => Seq(Resolver.file("dotM2", dotM2))), + 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 ) /** Following project only exists to pull previous artifacts of Spark for generating |