title: Resolving spark dependencies using sbt
body: <p>I was trying to build a very basic scala script having spark dependencies .
  But I am not able to make the jar out of it .</p>
  <p>The error generated :</p>
  <blockquote>
  <p>sbt.ResolveException: unresolved dependency: org.apache.spark#spark-core_2.12;1.6.0-SNAPSHOT: not found</p>
  </blockquote>
  <p>My build.sbt :</p>
  <pre><code>    import Dependencies._
  
      lazy val root = (project in file(&quot;.&quot;)).
       settings(
                 inThisBuild(List(
                                   organization := &quot;com.example&quot;,
                                   scalaVersion := &quot;2.12.1&quot;,
                                   version      := &quot;0.1.0-SNAPSHOT&quot;
                                )),
                 name := &quot;Hello&quot;,
                 libraryDependencies +=  &quot;org.apache.spark&quot; %% &quot;spark-core&quot; % &quot;1.6.0-SNAPSHOT&quot;,
                 resolvers += Resolver.mavenLocal
                  )
  </code></pre>
  <p>`</p>
  <pre><code>package example
  import org.apache.spark.SparkContext
  import org.apache.spark.SparkContext._
  import org.apache.spark.SparkConf
  
  object Hello  {
       def main(args: Array[String]) {
             val logFile = &quot;/Users/dhruvsha/Applications/spark/README.md&quot;                 
             val conf = new SparkConf().setAppName(&quot;Simple Application&quot;)
             val sc = new SparkContext(conf)
             val logData = sc.textFile(logFile, 2).cache()
             val numAs = logData.filter(line =&gt; line.contains(&quot;a&quot;)).count()
             val numBs = logData.filter(line =&gt; line.contains(&quot;b&quot;)).count()
             println(s&quot;Lines with a: $numAs, Lines with b: $numBs&quot;)
             sc.stop()
           }
  }
  </code></pre>
  <p>My source scala is in :</p>
  <blockquote>
  <p>/exampleapp/main/scala/example/Hello.scala</p>
  </blockquote>
  <p>Project name is exampleapp .</p>
  <blockquote>
  <p>scala version 2.12.2</p>
  <p>spark version 1.6.0</p>
  <p>sbt version   0.13.13</p>
  </blockquote>
  <p>Any sort of help will be appreciated and would be great if you could provide resources for learning about sbt and spark dependencies .</p>
  <p>Please see I am new to scala, spark and sbt .</p>