title: SBT / ScalaTest: Configurations already specified for module
body: <p>After cloning an SBT repo and trying to launch SBT shell inside the directory, I'm getting the following error</p>
  
  <pre><code>java.lang.IllegalArgumentException: requirement failed: Configurations already specified for module com.holdenkarau:spark-testing-base:2.2.0_0.7.2:test
  </code></pre>
  
  <p>The complete stack-trace is shown below</p>
  
  <pre><code>[error] java.lang.IllegalArgumentException: requirement failed: Configurations already specified for module com.holdenkarau:spark-testing-base:2.2.0_0.7.2:test
  [error]     at scala.Predef$.require(Predef.scala:277)
  [error]     at sbt.librarymanagement.DependencyBuilders.moduleIDConfigurable(DependencyBuilders.scala:30)
  [error]     at sbt.librarymanagement.DependencyBuilders.moduleIDConfigurable$(DependencyBuilders.scala:29)
  [error]     at sbt.package$.moduleIDConfigurable(package.scala:6)
  [error]     at $080896ebbef320cbbd4a$.$anonfun$$sbtdef$2(/Users/username/company/repo/submodule/build.sbt:37)
  [error]     at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
  [error]     at scala.collection.immutable.List.foreach(List.scala:389)
  [error]     at scala.collection.TraversableLike.map(TraversableLike.scala:234)
  [error]     at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
  [error]     at scala.collection.immutable.List.map(List.scala:295)
  [error]     at $080896ebbef320cbbd4a$.$anonfun$$sbtdef$1(/Users/username/company/repo/submodule/build.sbt:37)
  [error]     at sbt.internal.util.EvaluateSettings.$anonfun$constant$1(INode.scala:197)
  [error]     at sbt.internal.util.EvaluateSettings$MixedNode.evaluate0(INode.scala:214)
  [error]     at sbt.internal.util.EvaluateSettings$INode.evaluate(INode.scala:159)
  [error]     at sbt.internal.util.EvaluateSettings.$anonfun$submitEvaluate$1(INode.scala:82)
  [error]     at sbt.internal.util.EvaluateSettings.sbt$internal$util$EvaluateSettings$$run0(INode.scala:93)
  [error]     at sbt.internal.util.EvaluateSettings$$anon$3.run(INode.scala:89)
  [error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  [error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  [error]     at java.lang.Thread.run(Thread.java:748)
  [error] java.lang.IllegalArgumentException: requirement failed: Configurations already specified for module com.holdenkarau:spark-testing-base:2.2.0_0.7.2:test
  [error] Use 'last' for the full log.
  Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
  </code></pre>
  
  <p>What is the cause of this error and how to overcome it?</p>
  
  <hr>
  
  <p>My project configurations are</p>
  
  <ul>
  <li>Scala v2.11.11</li>
  <li>SBT v1.0.3</li>
  </ul>
  
  <hr>
  
  <p><strong>UPDATE-1</strong></p>
  
  <p>Here's my <code>build.sbt</code> file</p>
  
  <pre><code>import AwsDependencies._
  import Dependencies._
  import SparkDependencies._
  
  version := "0.0.1"
  
  // core settings
  organization := "com.company"
  scalaVersion := "2.11.11"
  
  // cache options
  offline := false
  updateOptions := updateOptions.value.withCachedResolution(true)
  
  // aggregate options
  aggregate in assembly := false
  aggregate in update := false
  
  // fork options
  fork in Test := true
  
  name := "Submodule"
  version := "0.0.1"
  
  //common libraryDependencies
  libraryDependencies ++= Seq(
    scalaTest,
    typesafeConfig,
    jodaTime,
    mysql,
    json,
    scopt,
    awsS3,
    sparkTesting
  )
  
  libraryDependencies ++= SparkDependencies.allSparkDependencies.map(_ % "provided")
  
  assemblyMergeStrategy in assembly := {
    case m if m.toLowerCase.endsWith("manifest.mf") =&gt; MergeStrategy.discard
    case m if m.startsWith("META-INF") =&gt; MergeStrategy.discard
    case PathList("javax", "servlet", _@_*) =&gt; MergeStrategy.first
    case PathList("org", "apache", _@_*) =&gt; MergeStrategy.first
    case PathList("org", "jboss", _@_*) =&gt; MergeStrategy.first
    case "about.html" =&gt; MergeStrategy.rename
    case "reference.conf" =&gt; MergeStrategy.concat
    case "application.conf" =&gt; MergeStrategy.concat
    case _ =&gt; MergeStrategy.first
  }
  </code></pre>
  
  <p>The stack-trace reports error on the following line of this <code>build.sbt</code> (of concerned submodule)</p>
  
  <pre><code>libraryDependencies ++= SparkDependencies.allSparkDependencies.map(_ % "provided")
  </code></pre>