You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/07/15 08:06:40 UTC
git commit: [SPARK-2467] Revert SparkBuild to publish-local to both
.m2 and .ivy2.
Repository: spark
Updated Branches:
refs/heads/master 9fe693b5b -> e2255e4b2
[SPARK-2467] Revert SparkBuild to publish-local to both .m2 and .ivy2.
Author: Takuya UESHIN <ue...@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.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e2255e4b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e2255e4b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e2255e4b
Branch: refs/heads/master
Commit: e2255e4b2c404f31ac9f7af9ed445141af980973
Parents: 9fe693b
Author: Takuya UESHIN <ue...@happy-camper.st>
Authored: Mon Jul 14 23:06:35 2014 -0700
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Mon Jul 14 23:06:35 2014 -0700
----------------------------------------------------------------------
project/SparkBuild.scala | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/e2255e4b/project/SparkBuild.scala
----------------------------------------------------------------------
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 44abbc1..754d54e 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