title: scala sbt : Error while importing sbt project:
body: <p>I am trying to run Hello_world in scala , I have installed scala and spark with sbt.</p>
  
  <p>but when i check scala -version it shows </p>
  
  <pre><code>Scala code runner version 2.12.6 -- Copyright 2002-2018, LAMP/EPFL and Lightbend, Inc.
  </code></pre>
  
  <p>But if i am checking spark version its showing :</p>
  
  <pre><code>spark-submit --version
  Welcome to
        ____              __
       / __/__  ___ _____/ /__
      _\ \/ _ \/ _ `/ __/  '_/
     /___/ .__/\_,_/_/ /_/\_\   version 2.3.1
        /_/
  
  Using Scala version 2.11.8, Java HotSpot(TM) 64-Bit Server VM, 1.8.0_181
  Branch 
  Compiled by user vanzin on 2018-06-01T20:37:04Z
  Revision 
  Url 
  Type --help for more information.
  </code></pre>
  
  <p>Now my sbt file looks like this:</p>
  
  <pre><code>name := "HelloScala"
  version := "0.1"
  scalaVersion := "2.11.8"
  libraryDependencies += "org.apache.spark" % "spark-core" % "2.3.1"
  </code></pre>
  
  <p>I also tried '2.12.6' but i am keep getting this error:</p>
  
  <pre><code>Error while importing sbt project:
  
  [info] Loading settings for project global-plugins from idea.sbt ...
  [info] Loading global plugins from /Users/monk/.sbt/1.0/plugins
  [info] Loading project definition from /Users/monk/Desktop/HelloScala/project
  [info] Loading settings for project helloscala from build.sbt ...
  [info] Set current project to HelloScala (in build file:/Users/monk/Desktop/HelloScala/)
  [info] sbt server started at local:///Users/monk/.sbt/1.0/server/cab071a62161b47022c3/sock
  sbt:HelloScala&gt;
  [info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile, shellPrompt
  [info] The new values will be used by no settings or tasks.
  [info] Reapplying settings...
  [info] Set current project to HelloScala (in build file:/Users/monk/Desktop/HelloScala/)
  [info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/monk/Library/Application Support/IdeaIC2018.2/Scala/launcher/sbt-structure-1.0.jar
  [info] Reapplying settings...
  [info] Set current project to HelloScala (in build file:/Users/monk/Desktop/HelloScala/)
  [info] Updating ...
  [warn]  module not found: org.apache.spark#spark-core;2.3.1
  [warn] ==== local: tried
  [warn]   /Users/monk/.ivy2/local/org.apache.spark/spark-core/2.3.1/ivys/ivy.xml
  [warn] ==== public: tried
  [warn]   https://repo1.maven.org/maven2/org/apache/spark/spark-core/2.3.1/spark-core-2.3.1.pom
  [warn] ==== local-preloaded-ivy: tried
  [warn]   /Users/monk/.sbt/preloaded/org.apache.spark/spark-core/2.3.1/ivys/ivy.xml
  [warn] ==== local-preloaded: tried
  [warn]   file:////Users/monk/.sbt/preloaded/org/apache/spark/spark-core/2.3.1/spark-core-2.3.1.pom
  [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
  [warn]  ::          UNRESOLVED DEPENDENCIES         ::
  [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
  [warn]  :: org.apache.spark#spark-core;2.3.1: not found
  [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
  [warn]
  [warn]  Note: Unresolved dependencies path:
  [warn]      org.apache.spark:spark-core:2.3.1 (/Users/monk/Desktop/HelloScala/build.sbt#L4-5)
  [warn]        +- default:helloscala_2.11:0.1
  [error] sbt.librarymanagement.ResolveException: unresolved dependency: org.apache.spark#spark-core;2.3.1: not found
  [error]     at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
  [error]     at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
  [error]     at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
  [error]     at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
  [error]     at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
  [error]     at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
  [error]     at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
  [error]     at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
  [error]     at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
  [error]     at xsbt.boot.Using$.withResource(Using.scala:10)
  [error]     at xsbt.boot.Using$.apply(Using.scala:9)
  [error]     at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
  [error]     at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
  [error]     at xsbt.boot.Locks$.apply0(Locks.scala:31)
  [error]     at xsbt.boot.Locks$.apply(Locks.scala:28)
  [error]     at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
  [error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
  [error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
  [error]     at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
  [error]     at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
  [error]     at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
  [error]     at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
  [error]     at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
  [error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
  [error]     at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
  [error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
  [error]     at scala.util.control.Exception$Catch.apply(Exception.scala:224)
  [error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
  [error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
  [error]     at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
  [error]     at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
  [error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2539)
  [error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
  [error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
  [error]     at sbt.std.Transform$$anon$4.work(System.scala:67)
  [error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
  [error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
  [error]     at sbt.Execute.work(Execute.scala:278)
  [error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
  [error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
  [error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
  [error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  [error]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  [error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  [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] sbt.librarymanagement.ResolveException: unresolved dependency: org.apache.spark#spark-core;2.3.1: not found
  [error]     at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
  [error]     at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
  [error]     at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
  [error]     at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
  [error]     at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
  [error]     at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
  [error]     at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
  [error]     at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
  [error]     at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
  [error]     at xsbt.boot.Using$.withResource(Using.scala:10)
  [error]     at xsbt.boot.Using$.apply(Using.scala:9)
  [error]     at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
  [error]     at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
  [error]     at xsbt.boot.Locks$.apply0(Locks.scala:31)
  [error]     at xsbt.boot.Locks$.apply(Locks.scala:28)
  [error]     at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
  [error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
  [error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
  [error]     at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
  [error]     at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
  [error]     at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
  [error]     at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
  [error]     at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
  [error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
  [error]     at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
  [error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
  [error]     at scala.util.control.Exception$Catch.apply(Exception.scala:224)
  [error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
  [error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
  [error]     at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
  [error]     at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
  [error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2539)
  [error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
  [error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
  [error]     at sbt.std.Transform$$anon$4.work(System.scala:67)
  [error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
  [error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
  [error]     at sbt.Execute.work(Execute.scala:278)
  [error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
  [error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
  [error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
  [error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  [error]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  [error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  [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] (update) sbt.librarymanagement.ResolveException: unresolved dependency: org.apache.spark#spark-core;2.3.1: not found
  [error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: unresolved dependency: org.apache.spark#spark-core;2.3.1: not found
  [error] Total time: 10 s, completed 7 Sep, 2018 5:25:02 PM
  [info] shutting down server
  </code></pre>
  
  <p>How to load or install any plugin via sbt in intelliJ ?</p>