title: How to add "provided" dependencies back to run/test tasks' classpath?
body: <p>Here's an example <code>build.sbt</code>:</p>
  
  <pre><code>import AssemblyKeys._
  
  assemblySettings
  
  buildInfoSettings
  
  net.virtualvoid.sbt.graph.Plugin.graphSettings
  
  name := "scala-app-template"
  
  version := "0.1"
  
  scalaVersion := "2.9.3"
  
  val FunnyRuntime = config("funnyruntime") extend(Compile)
  
  libraryDependencies += "org.spark-project" %% "spark-core" % "0.7.3" % "provided"
  
  sourceGenerators in Compile &lt;+= buildInfo
  
  buildInfoPackage := "com.psnively"
  
  buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, target)
  
  assembleArtifact in packageScala := false
  
  val root = project.in(file(".")).
    configs(FunnyRuntime).
    settings(inConfig(FunnyRuntime)(Classpaths.configSettings ++ baseAssemblySettings ++ Seq(
      libraryDependencies += "org.spark-project" %% "spark-core" % "0.7.3" % "funnyruntime"
    )): _*)
  </code></pre>
  
  <p>The goal is to have spark-core <code>"provided"</code> so it and its dependencies are not included in the assembly artifact, but to reinclude them on the runtime classpath for the <code>run</code>- and <code>test</code>-related tasks.</p>
  
  <p>It seems that using a custom scope will ultimately be helpful, but I'm stymied on how to actually cause the default/global run/test tasks to use the custom <code>libraryDependencies</code> and hopefully override the default. I've tried things including:</p>
  
  <pre><code>(run in Global) := (run in FunnyRuntime)
  </code></pre>
  
  <p>and the like to no avail.</p>
  
  <p>To summarize: this feels essentially a generalization of the web case, where the servlet-api is in "provided" scope, and run/test tasks generally fork a servlet container that really does provide the servlet-api to the running code. The only difference here is that I'm not forking off a separate JVM/environment; I just want to manually augment those tasks' classpaths, effectively "undoing" the "provided" scope, but in a way that continues to exclude the dependency from the assembly artifact.</p>