From 6ca990fb366cf68cd9d5afb433725d28f07e51a0 Mon Sep 17 00:00:00 2001 From: Josh Rosen Date: Thu, 10 Mar 2016 23:28:34 -0800 Subject: [SPARK-13294][PROJECT INFRA] Remove MiMa's dependency on spark-class / Spark assembly This patch removes the need to build a full Spark assembly before running the `dev/mima` script. - I modified the `tools` project to remove a direct dependency on Spark, so `sbt/sbt tools/fullClasspath` will now return the classpath for the `GenerateMIMAIgnore` class itself plus its own dependencies. - This required me to delete two classes full of dead code that we don't use anymore - `GenerateMIMAIgnore` now uses [ClassUtil](http://software.clapper.org/classutil/) to find all of the Spark classes rather than our homemade JAR traversal code. The problem in our own code was that it didn't handle folders of classes properly, which is necessary in order to generate excludes with an assembly-free Spark build. - `./dev/mima` no longer runs through `spark-class`, eliminating the need to reason about classpath ordering between `SPARK_CLASSPATH` and the assembly. Author: Josh Rosen Closes #11178 from JoshRosen/remove-assembly-in-run-tests. --- project/SparkBuild.scala | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'project') diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index a380c4cca2..e74fb17472 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -384,18 +384,19 @@ object OldDeps { lazy val project = Project("oldDeps", file("dev"), settings = oldDepsSettings) - def versionArtifact(id: String): Option[sbt.ModuleID] = { - val fullId = id + "_2.11" - Some("org.apache.spark" % fullId % "1.2.0") - } - def oldDepsSettings() = Defaults.coreDefaultSettings ++ Seq( name := "old-deps", scalaVersion := "2.10.5", - libraryDependencies := Seq("spark-streaming-mqtt", "spark-streaming-zeromq", - "spark-streaming-flume", "spark-streaming-twitter", - "spark-streaming", "spark-mllib", "spark-graphx", - "spark-core").map(versionArtifact(_).get intransitive()) + libraryDependencies := Seq( + "spark-streaming-mqtt", + "spark-streaming-zeromq", + "spark-streaming-flume", + "spark-streaming-twitter", + "spark-streaming", + "spark-mllib", + "spark-graphx", + "spark-core" + ).map(id => "org.apache.spark" % (id + "_2.11") % "1.2.0") ) } -- cgit v1.2.3